Toggle.v

From AGI Wiki
Revision as of 07:12, 24 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''toggle.v''' command toggles a flag's value indirectly. == Syntax == toggle.v(var vA); == Remarks == Toggles flag '''fB''' (from FALSE to TRUE o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The toggle.v command toggles a flag's value indirectly.

Syntax

toggle.v(var vA);

Remarks

Toggles flag fB (from FALSE to TRUE or TRUE to FALSE), where B is the value of vA.

Possible Errors

Changing values of reserved flags can have unpredictable results, and should be done carefully.

Example

Code:

<syntaxhighlight lang="agi"> v50 = 99; set.v(v50); [ f99 is now TRUE toggle.v(v50); [ f99 is now FALSE </syntaxhighlight>

Technical Information

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

See Also

Flag Commands