Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
X=y versus STORE y TO x
Message
 
To
06/07/2005 11:49:25
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01029522
Message ID:
01029814
Views:
15
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform