Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
M. prefix
Message
De
27/03/2003 13:25:01
 
 
À
27/03/2003 12:27:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00770764
Message ID:
00770874
Vues:
18
>>The "m" stands for memory variable. Preceeding any variable with it assures that a that variable itself is referenced rather than a field by the same name.
>
>With VFP8 "m" stands for more than just 'memory variable'. From the VFP8 Help for SCATTER: "To reference a property in an object that has the same name as an open table, preface the property name with the m. qualifier.". So it now can pertain to properties too.

I that's because what it says in help is wrong, IMO.

If you have a table test with a field dummy.
And you have a memory variable test referencing an object with a property dummy.

Then you need m.test.dummy to access the object.
Otherwise test.dummy will access the field.

There's no change from previous versions. What you often call an object is shorthand for a memory variable holding a reference to an object. You always hold an object by its handle (like a frying pan).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform