Difference between revisions of "Isset"
From AGI Wiki
Jump to navigationJump to search (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 <...") |
m (→Example) |
||
Line 24: | Line 24: | ||
print("flag 40 is set (TRUE)"); | print("flag 40 is set (TRUE)"); | ||
} | } | ||
+ | |||
if(f40) [ alternate syntax | if(f40) [ alternate syntax | ||
{ | { |
Latest revision as of 12:05, 14 April 2019
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) |