当我尝试编译我的 erlang 脚本时,我不断收到此错误:
(master@WN7-18TL6M1.amer.dell.com)15> c(distribute).
distribute.erl:55: syntax error before:
distribute.erl:42: function get_completed/3 undefined
error
这是我的来源:
get_completed(Current, Index, Count) ->
if
length(Current) >= Index ->
{Count, length(Current)};
true ->
if
lists:nth(Index, Current) == 'timeout' ->
get_completed(Current, Index+1, Count);
true ->
get_completed(Current, Index+1, Count+1)
end
end
第 55 行是最后一个end