Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object comparison
Message
From
12/10/1999 17:45:42
 
 
To
12/10/1999 12:14:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00275435
Message ID:
00275634
Views:
21
Hi JohnK,

There's actually a little more, but it is well hidden (IMHO).

Nothing really under "=, but a link (i guess that's what it's called) to "Relational Operators" and to "Store".

There is an example under relational operators and a few words. Under store there is nothing relative to objects or object references.

Most significantly, in my humble opinion, is NO mention of the other new functionality - to make an object reference equal to some other object reference, as in oCopyOfObj1 = oObj1 !!! yes, there is a statement like that in the small example in the "Relational Operators" bit, but no explanation at all.

As you know, this is but a tiny example of the shortcomings of the VFP documentation. Things like this make novices conclude that VFP does not operate within spec or that it is too complex.

regards,

Jim N

>Hey Jim,
>
>The = sign for objects was introduced in 6.0 and was not very well documented at all, that was the source of my confusion on this issue.
>
>"Can be used in Visual FoxPro 6.0 to determine if two object references refer to the same object." (from VFP6 HTMLHelp under What's New in Visual FoxPro)
>
>That's the extent of it.
>
>
>>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