>>>>>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