Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object comparison
Message
 
À
12/10/1999 12:03:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00275435
Message ID:
00275490
Vues:
19
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform