[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Comparing Objects
When comparing two variables to see if both refer to the same object,
the double equal operator (==) must be used. A single equal (=) will
cause a runtime error, as will a 'not equal' (<> or !=). If you wish
to check that two variables refer to different objects, it can be done
as follows:
if !(obj1 == obj2)
This is the standard behaviour of the Clipper language, and similarly
applies to comparisons of arrays.
When comparing an object with NIL, however, the 'not equal' operator
can be used. For example:
if obj <> NIL
This will work in all cases.
See Also:
Comparing Classes
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson