Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mdot question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01679493
Message ID:
01679809
Vues:
56
>>>>IMO, mdot is largely a matter of VFP folklore. Wake me up when it gets to Fox vs Clipper, or even better, Spectrum vs Commodore.
>>>
>>>Now you are allowed to guess the side I choose.
>>>;)
>>
>>Fine. Be stupid. I inherited lots of supposedly genius programmers over the years. All that allowed me to function was using m. as needed by the compiler. I currently have a table called latest. It is opened by a query. Then a scatter name is used. Then they use m.latest.fieldname. So, there goes any possible use of m.arrayname.
>>
>>If I write a piece of code for you to use, it will not break because of your table/field naming conventions. If you give me a piece of code, I am certain it will. This is the real world, not your isolated bubble.
>
>
>So....what you're really complaining about is that m.tablename.fieldname, which is the incorrect usage of m. (iirc). If yer gonna use a scatter memvar, then the correct usage would be m.fieldname. I simply consider it legacy code and when I used to run into it, after some minor research, it would be code that was written in FPD and had been ported through the versions, hopefully skipping FPW.

No, he uses "scatter name latest" (no scatter memvar), thus an object called "latest" is created and the he can either access the cursor ("latest.fieldname") or the object ("m.latest.fieldname"), I would try to avoid doing that because of it's human ambiguity when reading the code, but it is just preference. In my case I normally use loRecord ("scatter name loRecord") as the variable will be very short lived (local on a small function that has a single purpose, so I do not need to name the variable the same as the source alias, but if I wanted then I would use lo{Alias}Record, for example in this case loLatestRecord)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform