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

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -