In article <funeo6$qtn$1@[EMAIL PROTECTED]
>,
Thomas Weidenfeller <nobody@[EMAIL PROTECTED]
> wrote:
> Just some more data points. All on the same machine under Solaris 10:
Output data deleted for brevity.
> I think the conclusion is obvious. Don't use such constructs. These are
> anyhow constructs a sane programmer wouldn't have used at all :-)
I agree. I never use them. They were in the test suite. Clearly,
different versions of awk produce different output on this. Everything
else tests fine so I should be okay. I was just hoping I could make it
perfect.
Frankly, it never occurred to me that these would be different. I still
have trouble figuring out the logic behind the line that produced 28.
25 made sense, but not 28. It plays on very tricky features that nobody
in their right mind should use.
It is like some of the perl scripts I have seen where somebody manages
to compact a whole program into one line of code. Sure, you can do it,
but why?
> It is up to the language and standards lawyer to argue which of the two
> results is right under which conditions. IMHO for practical purposes it
> doesn't matter. Both behavior can apparently be found "in the wild". So
> again, I would completely avoid such twisted constructs in real-world
> awk programs.
You don't have to tell me. I like obvious code. I may have to figure
out what it is doing 10 years from now.
--
Robert B. Peirce, Venetia, PA 724-941-6883
bob AT peirce-family.com [Mac]
rbp AT cooksonpeirce.com [Office]


|