Phil,

>> In my test, Clipper did NOT optimize at all, Upper()/Lower()/Asc()/Chr().
>> Here is my simple test:
>>
>> PROCEDURE Main()
>> LOCAL c1 := Upper( "Hello" ), c2 := Lower( "World" )
>> LOCAL c3 := Chr( 65 )
>> LOCAL n1 := Asc( "A" )
>
> add here: c3 := Upper("hello2" + Chr(97))
>
>>
>> ? c1, c2, c3, n1
>> RETURN
>
> By observing the obj file, you can find the string "HELLO3A", so it
> looks like Clipper does not optimize Upper in LOCAL declarations, but
> optimizes the non-LOCAL occurence. (and optimizes Chr there. However,
> I can't easily read Clipper PCODE from binary files and so can't tell
> if Chr is optimized in LOCAL declarations.).
> As for the LOWER, AFAIR it was never optimized.

Ok, now I'm truly confused, I can't understand why would Clipper developers 
choose to NOT optimize same expressions in LOCAL, when they are optimized 
otherwise. I suppose we should check other declarations too, and try to 
understand the WHY.

FWIW, I can easily read generated PCODE with the free demo of VALKYRIE 5 
(v5demo.exe).

Ron 


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to