Equaln: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
m 2 revisions imported
Andrew Branscom (talk | contribs)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:AGI Pages]]
[[Category:AGI Pages]]
[[Category:AGI Pages to be Edited]]
[[AGI Logic Commands by Name|Return to Logic Commands by Name]]
<div align="center"><span style="font-size: 22pt">equaln</div>
<br />
==<br /> Introduction ==
The '''equaln''' command compares a [[variable (AGI)|variable]] value to a given number. It returns TRUE if the values are equal.
The '''equaln''' command compares a [[variable (AGI)|variable]] value to a given number. It returns TRUE if the values are equal.


Line 42: Line 50:
|}
|}


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


* [[Test Commands (AGI)|Test Commands]]
* [[Test Commands (AGI)|Test Commands]]
* '''[[equalv]]'''
* [[equalv]]
 
<br />&nbsp;
[[AGI Logic Commands by Name#Commands|< AGI Logic Command Index]]
&nbsp;
[[Category:Commands]]
[[Category:Commands]]
[[Category:AGI Logic Commands]]

Latest revision as of 17:49, 4 April 2025

Return to Logic Commands by Name

equaln



Introduction

The equaln command compares a variable value to a given number. It returns TRUE if the values are equal.

Syntax

equaln(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 ‘not equal’ test.

Possible Errors

None.

Example

Code:
if(v50 == 75) [ equivalent to 'if(equaln(v50, 75))'
  {  
  print("v50 equals 75");
  }

if(v50 != 75) [ equivalent to 'if(!equaln(v50, 75))'
  { 
  print ("v50 does not equal 75");
  }

Technical Information

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


References



Related Links


  < AGI Logic Command Index