[Harbour] -z switch seems to be overly anti-lazy
smu johnson
smujohnson at gmail.com
Wed Feb 3 04:35:31 EST 2010
Przemek,
I will try to take a video of the behaviour and figure it out. I swear to
you, that I am not making this up. If it helps, we are using Clipper 5.2e
and Blinker. I will take screenshots of the behavioru to prove what I am
saying is the case, and hopefully, with your Clipper knowledge :) we can
figure it out. Thanks for replying !
2010/2/3 Przemysław Czerpak <druzus at acn.waw.pl>
> On Tue, 02 Feb 2010, smu johnson wrote:
>
> Hi,
>
> > I have the test which has been proven with our Clipper 5.2e running on
> DOS
> > of a difference in Harbour.... below is an explanation I received by
> e-mail:
> > ====== start here
> > If eval({||devout("hello"),.f.)}) .or. .t.
> > endif
> > In Clipper the eval() will process (even though it appears redundant
> because
> > .t. will make the IF statement always return .t.
> > Harbour does not process the eval()
>
> The above is not true.
> Both Clipper (5.2 and 5.3) and Harbour execute above code in exactly
> the same way:
> iF -z compile time switch is used then "hello" is printed otherwise not.
>
> Please compile your example with Clipper and check results.
>
> > Unfortunately, my code could be scattered with situations where I have
> used
> > the Clipper behaviour to do something intentional (as in my search
> routine).
> > I will need to look for other places (or more likely wait for things to
> > break) and change the logic to get around this unless Harbour is
> interested
> > in making this fully compatible.
>
> If you need help then you have to show us the difference.
> Otherwise we do not know what is the problem.
>
> > ======
> > Any thoughts? Is it because the guy who showed me this line of code
> relied
> > too much on Clipper bugs when programming?
>
> Without real code example I cannot help you.
> Maybe you are not talking about normal code but about macrocompiler?
> Clipper does not have compile time optimizations in macrocompiler so
> it may give different results for the same code compiled directly and
> by macrocompiler. This is self contain exmaple which illustrates the
> difference:
>
> ? eval({||qout("hello"),.f.}) .or. .t.
> ? &('eval({||qout("WORLD"),.f.}) .or. .t.')
>
> If you show me the _exact_ code which creates problems for you then
> I can try to help you to resolve it or find workaround but I have to
> know what it is.
>
> best regards,
> Przemek
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> Harbour at harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour
>
--
smu johnson <smujohnson at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.harbour-project.org/pipermail/harbour/attachments/20100203/eb7cd82d/attachment.html
More information about the Harbour
mailing list