This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:refexists [2021/01/13 22:44] – created virgilw | 4rpl:commands:refexists [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | + | < |
- | < | + | |
- | === Syntax | + | ====== |
- | <-VAR | + | |
- | === Description === | + | ===== Syntax ===== |
- | Takes a string from the stack and uses it as a variable name. | + | |
- | Checks to see if the variable exists (has been assigned). | + | -?! |
- | If so, 1 is pushed to the stack else 0. | + | |
+ | ===== Description ===== | ||
+ | |||
+ | Takes a string from the stack and uses it as a variable name. If the variable exists (has been assigned), | ||
+ | |||
+ | ===== Examples ===== | ||
- | === Examples === | ||
<code 4rpl> | <code 4rpl> | ||
- | # Build a string by concatenating | + | "Santa isn't r-" ->secret |
- | " | + | |
- | -?! trace | + | |
- | </code> | + | |
+ | if (" | ||
+ | "I know a secret" | ||
+ | else | ||
+ | "I know no secrets" | ||
+ | endif | ||
+ | </ | ||
+ | |||
+ | ~~NOTOC~~ | ||