[erlang-questions] Newbie question: is there something like a main() method in Erlang?

Harish Mallipeddi <>
Sat Apr 28 06:49:34 CEST 2007


Hi,

I just started learning Erlang. I'm using Joe Armstrong's old book
(Concurrent programming in Erlang).

Anyways I'm wondering if there's like a main() method in Erlang which will
run automatically? Currently from the examples I've been coming across in
the book and online, you've to create a new module and then go to the Erlang
shell and do c('module_name') to compile/load the module. Is there a way to
just say "erl module.beam" and have it invoke some method automatically much
like how if __name__=="__main__" works in Python.

Many Thanks,

-- 
Harish Mallipeddi
http://poundbang.in/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070428/9a3ac12c/attachment.html>


More information about the erlang-questions mailing list