Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view


Sean Hinde-2
-module is a compiler directive which only has meaning within a source code
So to have a module called demo you must first create a file called demo.erl
(it must be called this - filenames and module names are linked with Erlang)
which contains the -module(demo). entry and the source code for your module
The downloadable PDF of part 1 of the Erlang book covers these issues very
nicely and is a good place to start:
Good luck,

-----Original Message-----
From: Joao Jr. [mailto:jj]
Sent: 16 February 2001 14:27
To: erlang-questions
Subject: help!

Hi, I'm beginner in erlang.

I can't use module in erlang, always return message error like:


Erlang (BEAM) emulator version 5.0.1 [threads]

Eshell V5.0.1 (abort with ^G)

1> -module(demo).

** exited: {undef,[{shell_default,module,[demo]},




{shell,eval_loop,2}]} **


What can I do?

Thanks, Joao Jr.

This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.