In the erlang shell I can run
io:format("~32.8X~n", [8, "0o"]).
0o10
and the output is as expected 0o10
. But when I try to run the same thing in iex as
:io.format("~32.8X~n", [8, "0o"])
** (ArgumentError) errors were found at the given arguments:
* 1st argument: failed to format string
(stdlib 3.17) io.erl:99: :io.format("~32.8X~n", [8, "0o"])
I cannot for the life of me figure out what the difference is. I’m literally copying and pasting the arguments so if it works in the erlang shell version it ought to work in the iex version. Any clues?