Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
X=y versus STORE y TO x
Message
De
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:
01029529
Vues:
15
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
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform