io:format and integers
Jouni Ryno
jouni.ryno@REDACTED
Thu Jul 12 16:44:52 CEST 2001
While I was again formatting my outputs I started to wonder:
What's the reason, that io:format does not contain integer (a'la %d/%i
in C) formats ? I need it so often, that I must be missing something
totally obvious ...
io:fwrite("~2..0s", [integer_to_list(7)]) works to write 07, but having
a sign is a bit more complicated :-)
As I already asked for hex (~h, ~H as they might be), could there be ~d
also ?
With regards
Jouni
Jouni Rynö mailto://Jouni.Ryno@fmi.fi/
http://www.geo.fmi.fi/~ryno/
Finnish Meteorological Institute http://www.fmi.fi/
Geophysical Research http://www.geo.fmi.fi/
P.O.BOX 503 Tel (+358)-9-19294656
FIN-00101 Helsinki FAX (+358)-9-19294603
Finland priv-GSM (+358)-50-5302903
"It's just zeros and ones, it cannot be hard"
More information about the erlang-questions
mailing list