Wed Apr 30 20:55:47 CEST 2003
> my file math1.erl as Wiliam Dominic writen.
> factorial (0) ->1;
> factorial (N) -> N * factorial (N-1).
> one that make me confused, the error point to line 8 but
> it only has 4 line :(
> I have tried to compile with so many formats ( in space
> format), but it still didn't work.
I suspect the file you're compiling is not the one you've shown
above. Perhaps you're starting the compiler in a different directory
to where the file is.
Here's what happens on my system:
matthias >cat math1.erl
factorial (0) ->1;
factorial (N) -> N * factorial (N-1).
Erlang (BEAM) emulator version 5.1.1 [source]
Eshell V5.1.1 (abort with ^G)
i.e. it works exactly as intended.
More information about the erlang-questions