[erlang-questions] Change in behaviour in 5.9
Bob Cowdery
bob@REDACTED
Fri Jan 13 23:15:43 CET 2012
Hi
In erl 5.8.2 I had this:
S = io_lib:format("~10.6.0f", [Freq]),
where Freq was a float, say 7.0 and this gave me
[["00","7.000000"]] so I concat the strings to get what I want which is
"007.000000"
In 5.9 the code breaks because I get [["00",55,46,48,48,48,48,48,48]].
Neither look right to me but I really don't understand the 5.9 result.
If I do io:format("~10.6.0f", [7.0]). it gives me what I would expect
"007.000000".
Can someone explain these behaviours please.
Thanks
Bob
More information about the erlang-questions
mailing list