【发布时间】:2017-06-01 01:57:51
【问题描述】:
我已经编写了宏来比较两个字符串,如下所示
-module(helloworld).
-export([start/0]).
-define(macro1(X,Y),{if X == Y -> "True"; true ->"False" end.}).
start() ->
io:fwrite("~w",[?macro1("str","str")]).
得到如下错误:
Compiling the source code....
$erlc helloworld.erl 2>&1
helloworld.erl:6: syntax error before: '.'
helloworld.erl:2: function start/0 undefined
【问题讨论】:
标签: erlang erlang-shell