Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object comparison
Message
 
To
12/10/1999 12:03:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00275435
Message ID:
00275490
Views:
20
Jim,

The equal sign comparison operator did not work at all for objects before VFP 5.0, using it caused an error. CompObj() compares two objects to see if they have the same properties and values (clearly described in the help file, rare as that may be). Prior to VFP 5 there was no easy way to find out if two variables were referencing the same object. It required a bunch of code that used compobj then changed a property value of one and compobj'd again to see if they were still comparable and finally resetting the test property's value.

The equal sign operator for objects was introduced in, I believe, VFP 5.0 and it was well documented in the What's New section of that version's help file. It was a new and highly requested behavior to be able to compare two object references to find out if they reference the exact same object. CompObj allows object comparison for property names and values being equal.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform