erlang 编译时出现记录错误
Some error occurred concerning record in erlang when compile
我是 erlang 的新手,这是我的代码:
-module(main).
-author("jasonzhu").
%% API
-export([new/2]).
-record(person, {name, age}).
new(Name, Age) ->
#person(name=Name, age=Age).
通过erl main.erl
在提示符下编译时,出现以下错误:
$ erlc main.erl
main.erl:20: syntax error before: '('
main.erl:13: function new/2 undefined
main.erl:15: Warning: record person is unused
有人能帮帮我吗?我没有看到任何针对我的问题的明确罪魁祸首。
提前致谢。
我是 erlang 的新手,这是我的代码:
-module(main).
-author("jasonzhu").
%% API
-export([new/2]).
-record(person, {name, age}).
new(Name, Age) ->
#person(name=Name, age=Age).
通过erl main.erl
在提示符下编译时,出现以下错误:
$ erlc main.erl
main.erl:20: syntax error before: '('
main.erl:13: function new/2 undefined
main.erl:15: Warning: record person is unused
有人能帮帮我吗?我没有看到任何针对我的问题的明确罪魁祸首。
提前致谢。