User Tools

Site Tools


4rpl:commands:refexists

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:refexists [2021/01/13 22:46] virgilw4rpl:commands:refexists [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
-~~NOTOC~~ + <=[[4rpl:start| Index]] 
-<=[[4rpl:start| Index]]+ 
 +====== Variable Exists (by reference) ====== 
 + 
 +===== Syntax =====
  
-=== Syntax === 
 -?! -?!
  
-=== Description === +===== Description ===== 
-Takes a string from the stack and uses it as a variable name.  + 
-Checks to see if the variable exists (has been assigned).  +Takes a string from the stack and uses it as a variable name. If the variable exists (has been assigned),(true) is pushed to the stack, otherwise (false). 
-If so, 1 is pushed to the stack else 0.+ 
 +===== Examples =====
  
-=== Examples === 
 <code 4rpl> <code 4rpl>
-# Build a string by concatenating "xy" and "z".  +"Santa isn't r-" ->secret
-"xy" "zconcat  +
--?! trace +
-</code+
  
 +if ("secret" -?!)
 +    "I know a secret" Trace
 +else
 +    "I know no secrets" Trace
 +endif
 +</code>
 +
 +~~NOTOC~~
  
4rpl/commands/refexists.1610577979.txt.gz · Last modified: 2025/02/14 14:56 (external edit)