On Mon, 10 Mar 2008 19:16:26 +0000, Ted MacNEIL wrote: > >They are not going to change after 30 years because that would break too many >things. > >That may not be logical, but that's how it works. > It's the rules. We gotta deal with it. I recently had the complementary problem coding an awk script while my mind was operating in Rexx mode. I had "0" in an environment variable and "0" behaves differently from 0 in some contexts.
In this case, I dealt with it by changing "if ( SWITCH )" to "if ( SWITCH + 0 )" to force a numeric test. Cowlishaw tried to implement the principle of least astonishment by designing so that if two things look the same, they should behave the same. Alas, a collateral consequence is that if two things look different, they may regardless behave the same. Do I understand correctly that in Java: 2 + "2" is 4, but "2" + 2 is "22"? The "+" operator is not commutative. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html