Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
LC_NUMERIC=fr_FR and floating point arithmetics
- X-seq: zsh-workers 18283
- From: Stephane CHAZELAS <Stephane_CHAZELAS@xxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: LC_NUMERIC=fr_FR and floating point arithmetics
- Date: Mon, 24 Feb 2003 18:45:03 +0100
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
$ LC_NUMERIC=fr_FR ksh93 -c 'float a=1; echo $(( a / 3 ))'
0,333333333333
$ LC_NUMERIC=fr_FR zsh -c 'float a=1; echo $(( a / 3 ))'
0,33333333333333331.
zsh seems to assume that "." is the decimal separator which is
not correct in a french locale.
I agree this is confusing. A ksh93 script such as
echo $(( 1. / 3 ))
won't work under french locale.
(must be echo $(( 1, / 3 )) )
(tried with zsh 4.1.0-dev-7)
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author