Issetv
From AGI Wiki
Revision as of 15:25, 9 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''issetv''' command returns the value of a flag indirectly. == Syntax == issetv(var vA) == Remarks == Test commands are only valid in an <code>if</co...")
The issetv command returns the value of a flag indirectly.
Syntax
issetv(var vA)
Remarks
Test commands are only valid in an if
statement.
The issetv command returns TRUE if the flag whose number matches the value of vA is set, FALSE if it is not. For example, if v50 equals 40, then issetv(v50)
returns TRUE if flag f40 is set.
This statement can be combined with the NOT
operator to create an ‘indirect flag not set’ test.
Possible Errors
None.
Example
Code:
<syntaxhighlight lang="agi"> v50 = 40; if(issetv(v50))
{ print("flag 40 is set"); }
</syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 8 (0x08 hex) |