Equalv: 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]]
[[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">Equalv</div>
<br />
==<br /> Introduction ==
The '''equalv''' command compares the values of two [[variable (AGI)|variables]]. It returns TRUE if the values are equal.
The '''equalv''' command compares the values of two [[variable (AGI)|variables]]. It returns TRUE if the values are equal.


Line 40: Line 48:
|}
|}


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


* [[Test Commands (AGI)|Test Commands]]
* [[Test Commands (AGI)|Test Commands]]
* '''[[Equaln]]'''
* [[Equaln]]
 
&nbsp;
[[Category:Commands]]
[[Category:Commands]]
[[Category:AGI Logic Commands]]

Revision as of 17:04, 3 April 2025

Return to Logic Commands by Name

Equalv



Introduction

The equalv command compares the values of two variables. It returns TRUE if the values are equal.


Syntax

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

Possible Errors

None.

Example

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

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


Technical Information

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


References



Related Links