[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error in number comparison
From: |
Miles Bader |
Subject: |
Re: Error in number comparison |
Date: |
23 May 2002 15:58:55 +0900 |
John Phillips <address@hidden> writes:
> I have a strange problem with Gawk.
> Prepending a zero to a number makes it unequal to the original number,
> except for single digit numbers.
I suspect gawk is treating them as octal numbers, using the `leading 0'
convention of C/C++ (the gawk documentation talks about this, in the
info node `(gawk)Nondecimal-numbers').
You can disable this behavior by using the `--traditional' option, but
this also turns off other gawk features; I'm not sure if there's anyway
to disable just the interpretation of octal constants.
-Miles
--
80% of success is just showing up. --Woody Allen