So, I know that the main Hello World program (how to print a line not intended for Erlang training with caviar and other things) looks like this
-module(hello).
-export([start/0]).
start() ->
io:format("Hello, World!").
Then i run erl
>erl
type
>c(hello)
and then
>hello
For escript version will it be?
-export([main/1]).
main([]) -> io:format("Hello, World!~n").
Then
chmod u+x hello
Where does the file name greet?
Why can't I use the same format as the module? (main / 0 and main ())?
source
share