[erlang-questions] Simple question??

Dale Harvey <>
Tue Feb 16 23:48:27 CET 2010


On 16 February 2010 22:36, Ish Rattan <> wrote:

> The follwoing modules:
>
> -module(t1).
> -export([print_it/1]).
>
> print_it(N) ->
>   Fac = fac(N),
>   io:format("fac of ~p is ~p~n", [N, Fac]).
>
> fac(1) -> 1;
> fac(N) -> N*fac(N-1).
>
> when executed as:
>  t1:print_it(5).
> produces:
> ** exception error: undefined function t1:prin_it/1
>
>
you typed t1:prin_it(9) in the shell instead of t1:print_it(9)


> What is the reason?
>
> -ishwar
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>


More information about the erlang-questions mailing list