Key Pages: [ Rope Home Page | Basics (tutorial) | Language Reference | Download ]
The "reg" action returns a reference to the numbered user register. This allows the "$a" through "$z" to be accessed as if they were part of a 26-element array.
This means that "$a" and "reg(1)" are equivalent, as are "$d" and "reg(4)".
For example - ways of setting $f to "hello"..
put( "hello" $f ) put( "hello" reg(6) ) "hello" $f put "hello" 6 reg put
Or - ways of printing the contents of $b..
print(get(reg(2))) 2 reg get print 2 reg print
The "reg" action was introduced in Rope versions after 1st Jan 2005 (20050101).
Lowth.com: [ Home | Rope | P2PWall | LinWiz | cutter | Protector - Free Antivirus software | TapeIO ]