Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do .. with... endwith
Message
De
01/07/1998 14:05:30
 
 
À
01/07/1998 14:03:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00112459
Message ID:
00113492
Vues:
29
>WITH/ENDWITH is really just a shorthand method to eliminate some typing while you're coding.
>
>Fred,
>
>I believe using WITH/ENDWITH also cuts run time since VFP does not have to constantly reload the object...
>
>this.name = "myObject"
>this.enabled = .T.
>this.visible = .T.
>
>runs slower than
>
>WITH this
>    .name = "myObject"
>    .enabled = .T.
>    .visible = .T.
>ENDWITH
>
>because the object is loaded only once compared to three times in the first example. This difference is not significant with a few calls, but with the thousands in a typical application the difference may be quite substantial.
>
>regards,

That's great news. Anything that's easier to code and is faster to boot is an added bonus!
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform