Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE IN cursorName
Message
From
11/01/2007 16:03:04
 
 
To
11/01/2007 15:53:14
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01184698
Message ID:
01184783
Views:
16
>>I didn't say it's necessary. I said it's a good practice. Doing this way you don't have to worry if some cursor 'tmpMyfavouritename' was left open (or is really need to be kept open) in some place and you try to use it now.
>
>That is simply your opinion. It is better to
>
>USE SOMETABLE ALIAS knownalias
>
>than it is to
>
>lcAlias = someudf()
>use sometable alias &lcAlias
>
>as you will have to constantly use macrosubbing or eval to use those aliases. This reduces the readability of the code and reduces performance.
>
Readability is always an opinionated topic, and one may use customized variable names, e.g. cMyFavouriteForThisSituationAlias instead of cAlias. Related performance is more interesting issue, but unfortunately it lost actuality long time ago, because of obvious hardware implications.
What I like about generating temporary aliases is some level of error-proofing. Just look to many builders/designers, they all generate temporary names. Would you consider them at fault?
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform