[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Decimal point or decimal comma
From: |
Göran Uddeborg |
Subject: |
Decimal point or decimal comma |
Date: |
Sat, 8 Aug 2009 21:28:27 +0200 |
I recently updated my gawk to
GNU Awk 3.1.6a
and some of my scripts stopped working, getting divisions with zero
and similar problems. I tracked this down to gawk no longer taking
locale into consideration when parsing numbers. The numbers read by
the script with decimal commas were no longer correctly parsed.
I see in the NEWS file that you reverted this intentionally since you
got complaints about the feature. I, for one, did appreciate it. But
I guess you can't please everyone.
It does cause me some problems though, and this mail is an enhancement
request.
Problem 1:
I do want the GNU-specific extensions in GAWK. As it is
now, I can not both get GNU extensions and number parsing according to
locale.
May I wish for a flag which just reenables the locale, but leaves GNU
extensions in place?
Problem 2:
I have scripts starting with
#! /bin/gawk -f
It is not possible to add multiple arguments in the #!-line.
Everything after the interpreter is given to the interpreter as a
single argument. So if I did
#! /bin/gawk --posix -f
it would be interpreted as
/bin/gawk "--posix -f" ...
which of course will fail. I will have to wrap my script in a second
script. Not a big deal, but annoying.
May I wish for the flag I wished for abovem to come in a single-letter
format? If it does, I can bundle flags together and say
#! /bin/gawk -Xf
where X is the new flag.
- Decimal point or decimal comma,
Göran Uddeborg <=
Re: Decimal point or decimal comma, Göran Uddeborg, 2009/08/11