I was hasty in saying that would work. The issue is that in the layers
that Tcl uses, some explicitly check for '.', but in the end you usually
just call the system strtod. Thus if you change locale, it will break
at the bottom level, but you can't work with other locale's because Tcl
is explicitly expecting "C" locale math (this is not a bug).
Perhaps, in the scheme of things, Tcl should never allow for strtod to
be the system version. There are other potential pitfalls than just
that function in modifying the locale though, so it would only be part
of a solution.
Jeff
> expr 12,0 + 1 returns the same error.
...
> On Monday 17 February 2003 18:44, you wrote:
> > > My aolserver returns an error when I do e. g. a [expr 12.0 + 1].
> > > [expr 12 + 1] works fine. The log says: syntax error in expression
"12.0
> > > + 1". It seems that it can't handle floats anymore. As soon as there
is a
> > > decimal it returns the error.
> >
> > As you are somewhere in Europe, you can get locale-sensitive.
> > Tcl explicitly sets LC_NUM to "C" locale (American) so that
> > numbers like "12.0" can be used always, not "12,0" as would be
> > "European". Some other extension may be modifying your locale,
> > which it shouldn't. You can easily test this assumption by
> > trying "12,0" in the expr above.