Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do .. with... endwith
Message
From
01/07/1998 14:05:30
 
 
To
01/07/1998 14:03:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00112459
Message ID:
00113492
Views:
28
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform