io:format with multiple variables - Erlang -
i trying use following multiple parameters:
io:format("message number ~s: blah, blah", [mynum])
i tried:
io:format("message number ~s: ~s", [mynum, mymessage])
but doesn't work. possible erlang? cannot seem find examples of how this.
try:
io:format("message number ~p: ~p", [mynum, mymessage])
if mynum or message not strings/atoms, need use ~p
Comments
Post a Comment