[erlang-questions] newbie needing help getting started
Sat Oct 10 15:51:57 CEST 2009
You cannot type -module(math1). directly into the shell.
make a file (math.erl) containing the lines "-module(math1). ..." etc.
then compile the module in the shell like this:
This will compile the code in math1.erl, then you can run the
functions in the shell
> math1:funcname(...) etc.
On Sat, Oct 10, 2009 at 3:45 PM, Juan Backson <> wrote:
> I am following the tutorial trying to get started. I am getting error with
> the following sample code in ERL command line.
> 10> -module(math1).
> ** exception error: undefined shell command module/1
> 11> -export([factorial/1]).
> ** exception error: bad argument in an arithmetic expression
> in operator '/'/2
> called as factorial / 1
> Could someone help me out ? What is wrong ?
More information about the erlang-questions