Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mdot question
Message
De
05/04/2021 16:28:52
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
05/04/2021 15:45:04
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01679493
Message ID:
01679526
Vues:
48
>>>The problem with a table with many fields / many tables is, VFP will first run against those, then against the list of variables. So for access mdot makes sense. But for assign a value or accessing something that simple could not be a field like a method or array there it does not much sense to use it.
>>
>>Lutz,
>>
>>Whether on the left side of a statement or in an expression, the variable is the same. I fail to understand why one would choose to reference it in different ways deliberately.
>
>Unused code is just bloat and adds nothing to usefulness. I can accept it speed up on several location. But makes code less readable. So I optimize? And mdot where there is no other way then variables could only make code slower. It must be dealt with.
>
>Best way for development is to skip mdot at all, it's super awkward (Just as adding alias for any field even if the alias is in scope. In fact it is aliasing memory variables) and in most cases VFP works without. It might be wiser to SELECT 0 and run variable based code without mdot instead of this oddness. In that case there is no field name, isn't it?

That would be really odd. However, you're right. Fox will choose a field name over a variable of the same name. The more fields in the table, the more it slows down. That is the documented behavior. Select 0 would work. What ever means you wish to use to avoid the behavior is up to you. You cannot guarantee that a timer won't switch the alias on you. I believe some version of Fox did not tolerate the m.object. syntax. I get used to the m. and I'm not a Nazi to tell others to do or not do it my way.

Readability is a tug-of-way between you and the computer.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform