[erlang-questions] Change in behaviour in 5.9
Tony Rogvall
tony@REDACTED
Fri Jan 13 23:23:17 CET 2012
I think the documentation is wrong here!
The return value should probably (to be safe) be documented as iolist() ?
/Tony
On 13 jan 2012, at 23:15, Bob Cowdery wrote:
> 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120113/d1f97250/attachment.htm>
More information about the erlang-questions
mailing list