Mr. Stowell,,
While I agree that MS has been advocating usage of "name expressions" in lieu of macros for a long time now for performance reasons, It is also noteworthy that the MS SAMPLE coding is replete with macros!
Hardly the way to convince people to move away from them, especially when you (MS that is) constantly refers people to the sample code for just about anything.
Cheers,
Jim N
>>> Thisform.&cObjectname..property=...). Therefore I like macros and I would
>>
>>> really appreciate to get some bench test numbers comparing speed.
>
>Mr. Pikman:
>I normally don't critique code, but this is particularly bad (not to mention inefficient) from an object-oriented point of view. There are way that this can be done that are much more in line with the OOP paradigm and don't involve macros.
>
>>Check this out :
>>
>>I run this code :
>>
>>*-------
>>lvarname='vn'
>>
>>start = seconds()
>>for x=1 to 10000
>> store 'test' to &lvarname
>>endfor
>>?seconds() - start
>>
>>start = seconds()
>>for x=1 to 10000
>> store 'test' to (lvarname)
>>endfor
>>?seconds() - start
>>*---------
>>
>>First loop = 4.426 sec
>>Second loop = 1.142 sec
>
>Mr. Varzura:
>Thank you for this demonstration. It's simple and clear.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only