io:format() vs io_lib:format()

Bengt Kleberg eleberg@REDACTED
Wed Feb 26 16:04:08 CET 2003


greetings,

are the differences between io:format() and io_lib:format() documented
anywhere? or is there no difference?

3> io:format( "asd~s~n", ["asd"]).
asdasd
ok
4> io_lib:format( "asd~s~n", ["asd"]).
[97,115,100,"asd","\n"]


io:format() gives me a single string.
io_lib:format() gives me a string with a string as element 3 (0 based).

is this a bug or a feature? or is it a result of flattening the string
as it goes to stdout?


bengt




More information about the erlang-questions mailing list