Definition:
|
integer i = equal(object x1, object x2)
|
Description:
|
Compare two phix objects to see if they are the same.
Return 1 (true) if they are the same. Return 0 (false) if
they are different.
|
Comments:
|
Note that RDSEu/OpenEuphoria typically need equal() or compare() on
each and every non-trivial conditional test, whereas Phix does not
and can use =, !=, etc. In reality Phix only supports equal() for
legacy code and compatibility with RDS Eu/OpenEuphoria.
|
Example 1:
|
if equal(PI, 3.14) then
puts(1, "give me a better value for PI!\n")
end if
|
Example 2:
|
if equal(name, "George") or equal(name, "GEORGE") then
puts(1, "name is George\n")
end if
|
See Also:
|
compare,
equals operator (=)
|
Technicalia
|
Technically equal(x1,x2) is equivalent to the expression compare(x1,x2)=0,
not that you really needed to know that.
|