Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.2 Online Documentation (MoTW) Revision 3
Compare two Objects (dbo_compare_two_objects.htm)
When comparing DataBasic objects (DBOs) only references are compared to see if they refer to the same object. So only an equality or non-equality comparison will be supported:
Object = Non-Object | Returns FALSE. |
Object = Object | Returns TRUE if they both reference the same object. Returns FALSE if they reference different objects. |
Object # Non-Object | Returns TRUE |
Object # Object | Returns FALSE if they reference different objects. Returns TRUE if they both reference the same object. |
All other object comparisons such as '<' and '>' will generate the following fatal run time error:
[B14] Bad stack descriptor.
To compare the contents of two objects, an object specific comparison method must be used where available.
OBJ1[ = || EQ || # || NE || <> || >< ] OBJ2
IF OBJ1 = OBJ2 THEN ...
Equality test on two objects.
IF OBJ3 # OBJ3 THEN ...
Inequality test on two objects.
OBJ = SOME_CLASS->SomeMethod()
IF OBJ # (object)0 THEN ...
Tests if the method SomeMethod returned a valid (non null) object.