[erlang-questions] running programs from win com prompt?

Bengt Kleberg <>
Thu Jun 5 07:12:05 CEST 2008


To run a function in a compiled module you do
erl -noshell -run module function -init stop

Modules are (usually) written and saved from your favourite editor. I
have an erlang shell running in one pane of acme
(http://plan9.bell-labs.com/wiki/plan9/Using_acme/index.html) and copy
working code from the shell to the file under development (in another

Is the file you mention as example.erl a module or a lot of nice command
lines for the shell?
A module should be compiled with erlc
(http://www.erlang.org/doc/man/erlc.html) before loading it. Or use the
shell command c(module_name) which will load it automatically.

Shell commands I copy from the file into the shell.
You could also look at file:consult/1 or file:eval/1

The shell will load compiled modules from the working directory or from
the load path. Files are located relative to the working directory.


 On Wed, 2008-06-04 at 20:02 +0000, Circular Function wrote:
> hi
> i know how to do basic calculations and write anonymous functions.
> however i dont understand from the tutorial how to write and save
> modules and run the from the erlang shell or command prompt.
> if i save a file as example.erl and try to run it from the
> commandprompt in windows it says
> is not recognized as a command etc.
> also, where should i save a file/module to be able to load it in the
> shell?
> ______________________________________________________________________
> Låna pengar utan säkerhet.
> Sök och jämför hos Yahoo! Shopping.
> _______________________________________________
> erlang-questions mailing list
> http://www.erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list