Isset

From AGI Wiki
Revision as of 23:30, 8 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''isset''' command returns the value of the specified flag. == Syntax == isset(flg fA)<br /> fA<br /> == Remarks == Test commands are only valid in an <...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The isset command returns the value of the specified flag.

Syntax

isset(flg fA)
fA

Remarks

Test commands are only valid in an if statement. The isset command returns TRUE if the flag is set, FALSE if it is not. You can use just the flag itself as an alternate syntax.

This statement can be combined with the NOT operator to create a ‘flag not set’ test.

Possible Errors

None.

Example

Code:

<syntaxhighlight lang="agi"> if(isset(f40))

 { 
 print("flag 40 is set (TRUE)");
 }

if(f40) [ alternate syntax

 {
 print("flag 40 is set (TRUE)");
 }

</syntaxhighlight>

Technical Information

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

See Also

Test Commands
issetv