zsh-workers
 help / color / mirror / code / Atom feed
* LC_NUMERIC=fr_FR and floating point arithmetics
@ 2003-02-24 17:45 Stephane CHAZELAS
  2003-03-10  8:58 ` Oliver Kiddle
  0 siblings, 1 reply; 6+ messages in thread
From: Stephane CHAZELAS @ 2003-02-24 17:45 UTC (permalink / raw)
  To: Zsh hackers list

$ 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-03-12  8:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24 17:45 LC_NUMERIC=fr_FR and floating point arithmetics Stephane CHAZELAS
2003-03-10  8:58 ` Oliver Kiddle
2003-03-10 19:25   ` Zefram
2003-03-11 10:35     ` Oliver Kiddle
2003-03-12  3:32       ` Philippe Troin
2003-03-12  8:30         ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).