[erlang-questions] A silly one?

Edoardo Batini eodbat@REDACTED
Thu Jan 28 15:42:53 CET 2010


On Thu, Jan 28, 2010 at 09:25:40AM -0500, Ish Rattan wrote:
> 
> I can't figure out how to print a term,
> assume tht factorial(N) is given and
> 
> print_it(N) ->
>    Fac = factorial(N),
>    io:format("fac of ~p is ~p~n", N, Fac).

the right one is:

io:format("fac of ~p is ~p~n", [N, Fac]).

> 
> -ishwar
> 
> 
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
> 


More information about the erlang-questions mailing list