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:
00250743
Vues:
23
Kile,

m is a reserved alias name that refers to memory variables. It is required whenever there is both a field and a memvar with the same name and the code reference is ambiguous as to which it refers to;
USE Customer && Has field named Company
Company = "ACME" && Refers to memvar because fields don't work with =
IF Company = "ACME"  && refers to teh field because Fox always uses a field 
                     && over a memvar

IF m.Company = "ACME"  && Refers to teh memvar because the m. alias name
                       && means memvar
m. is not a historical issue, it is equally needed today as it ever was whenever there is ambiguity between a memvar and a field. There cna be a good argument made for the use of m. all the time to allow for unexpected changes in table structure later that might cause an ambiguity that isn't there today.

The sue of m as the alias name has nothing to do with the number of work areas, m was used when there were only two work area Primary and secondary. The m is used because it is a nemonic for memvar.

Fox never had 12 works areas, the number of work areas during the evolution of the product were 2, 10, 25, 225, 32000+ (today).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform