Toggle

From AGI Wiki
Revision as of 07:02, 24 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''toggle''' command toggles a flag's value. == Syntax == toggle(flg fA); == Remarks == Toggles flag '''fA''' (from FALSE to TRUE or TRUE to FALSE). == P...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The toggle command toggles a flag's value.

Syntax

toggle(flg fA);

Remarks

Toggles flag fA (from FALSE to TRUE or TRUE to FALSE).

Possible Errors

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

Example

Code:
set(f99);    [ now f99 = TRUE
toggle(f99); [ now f99 = FALSE

Technical Information

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

See Also

Flag Commands