Index
Comparators

eq

eq

Description

Two items are popped from the stack and compared for equality. 0 or 1 is pushed back to the stack where 1 indicates equal and 0 (zero) indicates not equal.
The equal/not equal evaluation can also be performed with “true” (1) and false(0), respectively.

Note: See Data Types for comparison between dissimilar types and type conversion.

Examples

if (1 eq (1))
    trace("1 is equal to 1")
endif
 
#  alternate example
 
1 dup eq
if true
  trace ("one is always one")
endif

Index