Greatern: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
m 2 revisions imported
Andrew Branscom (talk | contribs)
No edit summary
Line 1: Line 1:
[[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">Greatern</div>
<br />
==<br /> Introduction ==
The '''greatern''' command compares a [[variable]] value to a number. It returns TRUE if the value of the variable is greater than the number.
The '''greatern''' command compares a [[variable]] value to a number. It returns TRUE if the value of the variable is greater than the number.


Line 46: Line 55:
|}
|}


== See Also ==
==<br /> References ==
 
<references />
 
==<br /> Related Links ==


[[Test Commands]]<br />
* [[Test Commands]]
'''[[greaterv]]'''<br />
* [[greaterv]]
[[Category:Commands]]<br />
&nbsp;
[[Category:Commands]]
[[Category:AGI Logic Commands]]

Revision as of 17:10, 3 April 2025

Return to AGI Logic Commands by Name

Greatern



Introduction

The greatern command compares a variable value to a number. It returns TRUE if the value of the variable is greater than the number.

Syntax

greatern(var vA, byt B)
vA > B

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(greatern(v50, 75))
  {
  print("v50 is greater than 75");
  }

if(v50 > 75)  [ alternate syntax
  {
  print("v50 is greater than 75");
  } 

if(v50 <= 75)  [ equivalent to 'if(!greatern(v50, v51))'
  {
  print ("v50 is less than or equal to 75");
  }

Technical Information

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


References



Related Links