Greaterv: Difference between revisions
From Sierra Wiki
Jump to navigationJump to search
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
The '''greaterv''' command compares the values of two [[ | [[Category:AGI Pages]] | ||
[[Category:AGI Pages to be Edited]] | |||
[[AGI Logic Commands by Name|Return to AGI Logic Commands by Name]] | |||
<div align="center"><span style="font-size: 22pt">Greaterv</div> | |||
<br /> | |||
==<br /> Introduction == | |||
The '''greaterv''' command compares the values of two [[AGI Variable|variables]]. It returns TRUE if the value of the first [[AGI Variable|variable]] is greater than the value of the second [[AGI Variable|variable]]. | |||
== Syntax == | == Syntax == | ||
| Line 46: | Line 55: | ||
|} | |} | ||
== | ==<br /> References == | ||
<references /> | |||
==<br /> Related Links == | |||
[[Test Commands]] | * [[AGI Command Reference - Test Commands|Test Commands]] | ||
* [[greatern]] | |||
[[Category:Commands]] | <br /> | ||
[[AGI Logic Commands by Name#Commands|< AGI Logic Command Index]] | |||
| |||
[[Category:Commands]] | |||
[[Category:AGI Logic Commands]] | |||
Latest revision as of 17:50, 4 April 2025
Return to AGI Logic Commands by Name
Greaterv
Introduction
The greaterv command compares the values of two variables. It returns TRUE if the value of the first variable is greater than the value of the second variable.
Syntax
greaterv(var vA, var vB) vA > vB
Remarks
Test commands are only valid in an if statement.
This statement can be combined with the NOT operator to create a ‘less than or equal to’ test.
Possible Errors
None.
Example
Code:
if(greaterv(v50, v51))
{
print("v50 is greater than v51");
}
if(v50 > v51) [ alternate syntax
{
print("v50 is greater than v51");
}
if(v50 <= v51) [ equivalent to 'if(!greaterv(v50, v51))'
{
print ("v50 is less than or equal to v51");
}Technical Information
| Required Interpreter Version: | Available in all AGI versions. |
| Byte-Code Value: | 6 (0x06 hex) |
References