mac erlang hello world

来源:互联网 发布:史上最奇葩的淘宝差评 编辑:程序博客网 时间:2024/06/05 21:56

进入erlang,命令:erl

退出erlang,q(). halt(). 注意必须有. 符号。erl中.后回车是执行的意思

当添加.好后,如果出现 syntax error before: 提示忽略,多按几次回车后。再输入.进行测试

创建文件hello.erl

-module (hello).
-export ([funtion/0]).
funtion() ->
io:format("hello, world~n").

在文件目录 erl进入

c(hello).

{ok,hello}

hello:function(). 


0 0
原创粉丝点击