Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field overlaping local variable - Bug or not ?
Message
De
05/06/2003 09:16:33
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
05/06/2003 09:02:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00796540
Message ID:
00796631
Vues:
21
For one variable that's true, but consider how many variables are in your system(s) and how many fields are in your tables and how many loops ...

>Hi Mike,
>
>I guess you're right. I never really stopped to consider that, but it makes sense (although I wouldn't want to live on the difference). ;)
>
>Alan
>
>>Hey Alan!
>>
>>Your code will also be faster! The more fields in the current alias, the longer it takes VFP to figure out "ok" is not a field, before returning the memvar content.
>>
>>Check out http://fox.wikis.com/wc.dll?Wiki~EssentialMDot~VFP
>>
>>>I used to think that too, but as Jim pointed out, that's what the 'm.' is for. Once you get into the habit of explicitly pointing to what you want - ie - always using alias.field and m.variable, not only will your code become more readable, but Fox will no longer have to guess what you mean, and it will begin to feel more natural.
>>>
>>>Like I said, I had the same argument you do once upon a time, but I've since changed my mind.
>>>
>>>Alan
>>>
>>>>>Hi Srdjan,
>>>>>
>>>>> Because VFP read as first field OK from cursor test before variable.
>>>>>
>>>>
>>>>Hi Martin :)
>>>>
>>>>I understood what is happening - What I am saying is that this situation shld be handled somewhat differently by VFP.
>>>>
>>>>That is all.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform