Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
X=y versus STORE y TO x
Message
 
À
06/07/2005 11:49:25
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01029522
Message ID:
01029814
Vues:
14
Wow, that makes a lot of sense. I never realized that STORE could be used to put a value in multiple variables. I will definitely use that the next time I need to store a value into multiple variables.

Thanks for the tip!

-Don


>For performance, you can do some speed tests. I don't know, really - and I would prefer whatever is more readable.
>
>One advantage of STORE - which makes me use it every now and then - is that the same value can be stored to more than one place. Here is an example where this can come in useful:
>
>
>* I don't like the repeating condintion in the following:
>with ThisForm
>  TxtOption1.Enabled = goApp.UserLevel <= 2
>  TxtOption2.Enabled = goApp.UserLevel <= 2
>endwith
>
>* Simplify, to avoid repeating the condition
>with ThisForm
>  store goApp.UserLevel <= 2 to;
>    TxtOption1.Enabled,;
>    TxtOption2.Enabled
>endwith
>
>
>>What difference is there between using:
>>
>>x=y
>>
>>or using:
>>
>>STORE y TO x
Don Knoup
don.knoup@ticomix.com
Ticomix, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform