我的文件夹中有单个文件:
test.erl
Run Code Online (Sandbox Code Playgroud)
但是我无法编译我的模块:
test.erl:8: syntax error before:
test.erl:2: function area/1 undefined
Run Code Online (Sandbox Code Playgroud)
这是我尝试编译test.erl文件的方法:
erlc ./test.erl
Run Code Online (Sandbox Code Playgroud)
test.erl包含以下行:
-module(test).
-export([area/1]).
% comment
area({triangle, A, B, C}) ->
S = (A + B + C) / 2,
math:sqrt(S*(S-A)*(S-B)*(S-C));
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
| 归档时间: |
|
| 查看次数: |
70 次 |
| 最近记录: |