Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a variable to store an object name
Message
From
05/06/1997 10:09:42
 
 
To
05/06/1997 10:03:54
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00035059
Message ID:
00035183
Views:
42
>>>>>REPORT FORM (lcReportName) TO PRINTER
>>>>
>>>>Macros are universal in VFP, so I consider them as better code.
>>>
>>>Mr Edward, sorry to interrupt u, but as far as I know macros slow down the operation and wherever its possible we should use name substitution.
>>>
>>>Infact in clipper, introducing code blocks was done to avoid macros altogether.
>>>
>>>Pls advs.
>>
>>I will really appreciate if you would tell me how much macro will 'slow down the operation', especially in particular case of abovementioned code.
>
>Well, not so much in the above mentioned code, but what I read and know, specialy in clipper, full comparisons of macros versus code block/name substitution was there.
>
>To support macros, it actually needs a kind of mini compiling engine to compile that code which is substituted be a macro, so as many times u run that same line of code, every time it will compile the same code, no matter you have done changes or not..
>
>Whereas that is not the case with code blocks...
>
>This all info. I got from a book of Mr. Rick Spence
>
>Programmer's Guide to Clipper. There is a full detailed chapter on this thing and he has strongly recommended not to use macros.
>
>Now being a xBase lang. I guess same thing applies to Fox Pro also.
>
>Do you still think/suggest to use macros overall(not particularly in this case)
>Pls advs.

Personally, I use macros. I know that name expression is recommended and it's written in VFP manual... but sometimes you can use macros only, and it's especially efficient working with objects (using constructions like Thisform.&cObjectname..property=...). Therefore I like macros and I would really appreciate to get some bench test numbers comparing speed.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform