Difference between revisions of "Lessn"
From AGI Wiki
Jump to navigationJump to search (Created page with "The '''lessn''' command compares a variable value to a number. It returns TRUE if the value of the variable is less than the number. == Syntax == lessn(var...") |
m (→Example) |
||
Line 30: | Line 30: | ||
} | } | ||
− | if(v50 >= 75) [ equivalent to 'if(!lessn(v50, 75)) | + | if(v50 >= 75) [ equivalent to 'if(!lessn(v50, 75))' |
{ | { | ||
print ("v50 is greater than or equal to 75"); | print ("v50 is greater than or equal to 75"); |
Latest revision as of 12:06, 14 April 2019
The lessn command compares a variable value to a number. It returns TRUE if the value of the variable is less than the number.
Syntax
Remarks
Test commands are only valid in an if
statement.
This statement can be combined with the NOT
operator to create a ‘greater than or equal to’ test.
Possible Errors
None.
Example
Code:
<syntaxhighlight lang="agi"> if(lessn(v50, 75))
{ print("v50 is less than 75"); }
if(v50 < 75) [ alternate syntax
{ print("v50 is less than 75"); }
if(v50 >= 75) [ equivalent to 'if(!lessn(v50, 75))'
{ print ("v50 is greater than or equal to 75"); }
</syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 3 (0x03 hex) |