User Tools

Site Tools


4rpl:commands:exists

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
4rpl:commands:exists [2021/01/13 22:35] – created virgilw4rpl:commands:exists [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
-~~NOTOC~~ + <=[[4rpl:start| Index]]
-<=[[4rpl:start| Index]]+
  
-=== Syntax === +====== Variable Exists ======
--?VAR+
  
-=== Description === +===== Syntax =====
-Checks to see if VAR exists (has been assigned). If so, 1 (true) is pushed to the stack else 0 (false).+
  
-=== Examples === +-?VARNAME 
-<code 4rpl>if (-?triggered !)  + 
-   true ->triggered +===== Description ===== 
-endif + 
 +Checks to see if a variable with name **VARNAME **exists (has been assigned). If so, 1 (true) is pushed to the stack else 0 (false). 
 + 
 +===== Examples ===== 
 + 
 +<code 4rpl> 
 +if (-?TheAnswer# checks if the variable exists 
 +    "We have the answer" Trace 
 +else 
 +    "We do not have the answer" Trace 
 +endif
 </code> </code>
 +
 +~~NOTOC~~
 +
4rpl/commands/exists.1610577345.txt.gz · Last modified: 2025/02/14 14:56 (external edit)