User Tools

Site Tools


crpl:docs:refread

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
crpl:docs:refread [2014/10/01 15:02] – external edit 127.0.0.1crpl:docs:refread [2022/06/25 13:10] (current) – Reformat Karsten75
Line 1: Line 1:
-~~DISCUSSION~~ 
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#vars_and_functions|Vars and Functions]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#vars_and_functions|Vars and Functions]]
  
 =====  <-!  ===== =====  <-!  =====
  
-^Arguments^Result^Notation^ +===== Syntax =====
-| |An item read from the variable named s1 |''s1 -- n1 ''|+
  
 +<-varname ->!
 +
 +===== Description =====
 +
 +Pops a value from the stack and treats it as a variable name, then pops another value from the stack and assigns it to that variable.
  
-=== Description === 
-Reads the contents of the local variable named s1 and pushes it to the stack.  
-Since s1's contents can vary, this allows dynamic reading of variables. 
 === Examples === === Examples ===
 <code> <code>
-# Store a number in the variable named xyz 123 ->xyz  +# Store a number in the variable named xyz  
-# Build a string by concatenating "12" and "3".  +123 ->xyz  
-# The results is "123". Use that as the name of a var and read its contents. +# Build a string by concatenating "xy" and "z".  
 +# The result is "xyz". Use that as the name of a var and read its contents. 
 # The result of the read is pushed to the stack and traced.  # The result of the read is pushed to the stack and traced. 
-"12" "3" concat +"xy" "z" concat 
 <-! trace <-! trace
 </code>  </code> 
  
  
crpl/docs/refread.1412190170.txt.gz · Last modified: 2014/10/12 18:46 (external edit)