[erlang-questions] Change in behaviour in 5.9

Bob Cowdery bob@REDACTED
Fri Jan 13 23:15:43 CET 2012


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

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

Can someone explain these behaviours please.


More information about the erlang-questions mailing list