[erlang-questions] getting started with IO: question about syntax
David Clarke Stevens
Mon Oct 30 11:19:52 CET 2006
I know this is a typical noob question, but I'm just getting into Erlang and
can't seem to get it working correctly. I've written a simple factorial
function that I want to display text with, but the compiler complains about
syntax...any help would be appreciated!!
io:format("The factorial of 5 is: ").
if X == 1 ->
X * fac(X - 1)
The compile error I'm getting is:
./factorial.erl:6: syntax error before: '.'
./factorial.erl:8: Warning: function fac/1 is unused
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions