Lessv: Difference between revisions
From Sierra Wiki
Jump to navigationJump to search
m 2 revisions imported |
No edit summary |
||
Line 1: | Line 1: | ||
The '''lessv''' command compares the values of two [[ | The '''lessv''' command compares the values of two [[Variable (AGI)|variables]]. It returns TRUE if the value of the first variable is less than the value of the second variable. | ||
== Syntax == | == Syntax == | ||
lessv([[ | lessv([[Variable (AGI)|var]] vA, [[Variable (AGI)|var]] vB)<br /> | ||
vA < vB | vA < vB | ||
Line 46: | Line 46: | ||
|} | |} | ||
== | ==<br /> References == | ||
[[Test Commands]] | <references /> | ||
[[Category:Commands]] | ==<br /> Related Links == | ||
* [[Test Commands]] | |||
* [[lessn]] | |||
| |||
[[Category:Commands]] | |||
[[Category:AGI Logic Commands]] |
Revision as of 19:42, 3 April 2025
The lessv command compares the values of two variables. It returns TRUE if the value of the first variable is less than the value of the second variable.
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:
if(lessv(v50, v51))
{
print("v50 is less than v51");
}
if(v50 < v51) [ alternate syntax
{
print("v50 is less than v51");
}
if(v50 >= v51) [ equivalent to 'if(!lessv(v50, v51))'
{
print ("v50 is greater than or equal to v51");
}
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 4 (0x04 hex) |
References
Related Links