bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk 3.1.3: $1 float interpretation


From: Stepan Kasal
Subject: Re: gawk 3.1.3: $1 float interpretation
Date: Mon, 21 Jul 2003 13:53:05 +0200
User-agent: Mutt/1.2.5.1i

Hello,

> On Sat, 19 Jul 2003, Hartmut Henkel wrote:
> > 1.1
> > // {print $1; print ($1 * 1000) }
> >
> > gives:
> > 1.1
> > 1000
> >
> > gawk 3.1.0 gives:
> > 1.1
> > 1100

On Sat, Jul 19, 2003 at 04:58:25PM +0200, Hartmut Henkel wrote:
> Just found that this is a LOCALE problem. The error appears with
> LANG=de_DE.ISO-8859-1, but gawk does correctly if LANG="C". So LANG
> should be set to "C" where gawk scans his input.

this is a feature.  It's codified by POSIX this way.
Perhaps it's better to obey the standard then to invent an alternative
solution.

It's documented: see   info '(gawk)Conversion'
on a host where gawk-3.1.3 is installed.

I, personally, never set other locale then "C".  ;-)

        Stepan Kasal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]