Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Class(y) - <b>comparing objects</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson