Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Don't Laugh...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00250702
Message ID:
00250808
Vues:
25
>I keep running across examples of code that occasionally prefix variables with m. (ie. m.nTablesUsed = AUSED(aTablesUsed))
>
>I've been trying to figure out what the signifigance of the m. is in the context of the code, but it's hasn't clicked yet. All of the books I've been reading provide examples of code using it, but none have explained the purpose. (My guess is that's it's so elementary they didn't think it needed to be explained, which may be true, but there are always a few in the crowd that happen to be more dense than the rest =)
>Can somebody please enlighten me? (Or, if it's a lengthy explanation, point me to documentation...)
>
>Thanks!

Kile --

the m. qualifier specifically identifies a memory variable (memvar). It comes in handy if you have a situation where a memvar might have the same name as a field in a table. Using m. assures that the memvar is specifically referenced, and not some other entity of the same name.

You'll find varying opinions as to whether one should use m. or not. I prefer to use m. in my code so that there is never any question as to what is happening...I've been told by others that it makes my code easier to follow.

Bill
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform