Is there a way to have a full interpreter in Erlang, not just a "shell".
Since it is a dynamic language, not being able to define named functions in the interpreter is a little bit disappointing... I suspect that it is because compilation units (modules) must be explicitly compiled for their execution by the VM, but maybe a REPL acting as a dynamic/recompilable module exist?
Erlang programs must be compiled to object code. The compiler can generate a new file that contains the object code. The current abstract machine, which runs the object code, is called BEAM, therefore the object files get the suffix .
On a Unix system you enter the command erl at the operating system prompt. This command starts the Erlang runtime system and the Erlang shell. On the Windows platform you normally start Erlang/OTP from the start menu. You can also enter the command erl or werl from a DOS box or Command box.
JCL mode Once there you can use the command q to quit the Erlang shell. This is similar in effect to erlang:halt(0).
> F= fun () -> io:format("Hello World~n", []) end.
> F().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With