Rindirect

From AGI Wiki
Revision as of 11:40, 20 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''rindirect''' command assigns the indirect value of one variable to another. == Syntax == rindirect(var vA, var vB);<br /> vA = *vB; ==...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The rindirect command assigns the indirect value of one variable to another.

Syntax

rindirect(var vA, var vB);
vA = *vB;

Remarks

This command is referred to as 'right indirection". The value of variable vA is set to the value of vC (where C is the value of vB).

Possible Errors

None.

Example

Code:
v51 = 75;
v75 = 99;
v99 = 10;
rindirect(v50, v51);  [ now v50 = 99
v50 = *v75;           [ now v50 = 10

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 10 (0x0A hex)

See Also

Mathematical Commands
lindirectn
lindirectv