Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] string_of_float -> float_of_string locale dependency bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Evgeny Chukreev <sjah@l...>
Subject: [Caml-list] string_of_float -> float_of_string locale dependency bug
Hello!

/tmp% echo $LANG
ru_RU.KOI8-R

/tmp% ocaml -I /usr/local/lib/ocaml/3.07/camomile/ bigarray.cma camomile.cma
        Objective Caml version 3.07+2

# float_of_string "0,";;
- : float = 0.
# string_of_float 0,;;
Syntax error
# string_of_float 0.;;
Fatal error: exception Failure("float_of_string")

Looks like string_of_float returns "0." (not depends on locale)
but float_of_string can't parse such string due to locale dependency.

-- 
... WBR, Evgeny ...

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners