Lessn: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
m 1 revision imported
Andrew Branscom (talk | contribs)
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
The '''lessn''' command compares a [[variable]] value to a number. It returns TRUE if the value of the variable is less than the number.
[[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">lessn</div>
 
<br />
==<br /> Introduction ==
 
The '''lessn''' command compares a [[Variable (AGI)|variable]] value to a number. It returns TRUE if the value of the variable is less than the number.


== Syntax ==
== Syntax ==


lessn([[variable|var]] vA, [[number|byt]] B)<br />
lessn([[Variable (AGI)|var]] vA, [[Number (AGI)|byt]] B)<br />
vA < B
vA < B


Line 46: Line 55:
|}
|}


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


[[Test Commands]]<br />
* [[AGI Command Reference - Test Commands|Test Commands]]
'''[[lessv]]'''<br />
* [[lessv]]
[[Category:Commands]]<br />
<br />&nbsp;
[[AGI Logic Commands by Name#Commands|< AGI Logic Command Index]]
&nbsp;
[[Category:Commands]]
[[Category:AGI Logic Commands]]

Latest revision as of 18:10, 4 April 2025

Return to AGI Logic Commands by Name

lessn



Introduction

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 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 ‘greater than or equal to’ test.

Possible Errors

None.

Example

Code:
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");
  }

Technical Information

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


References



Related Links


  < AGI Logic Command Index