Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object comparison
Message
From
12/10/1999 11:01:23
 
 
To
12/10/1999 10:52:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00275435
Message ID:
00275446
Views:
25
>Hi All,
>
>In VFP6, we now have the ability to use the "=" sign to compare objects. I have a situation using the "=" sign where it will always return .F., and I don't think it's supposed to. Try this:
>
>USE atable
>GO TOP
>SCATTER NAME object1
>SCATTER NAME object2
>
>As you can see, objects 1 and 2 are created from the same table and row. So, why would ?object1=object2 return .F.?
>
>Am I missing something fundamental here?

You are comparing object references, not objects. This comparison will evaluate to true only if the references point to the same instance. Looks like you want the COMPOBJ( ) function.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform