[erlang-questions] Where is the syntax error.

zxq9 zxq9@REDACTED
Thu Sep 24 14:47:48 CEST 2015


On 2015年9月24日 木曜日 14:45:06 Roelof Wobben wrote:
> Now I want to test it in erl.
> But then I see this output:
> 
> time:elapsed_time(Answer = fun() -> io:format("Sucess") end. ).
>   * 1: syntax error before: '.'
> 
> Can someone give me  a tip where the syntax errror is.

The message is confusing because you have two periods.
This is also the error.

Try this way:

time:elapsed_time(Answer = fun() -> io:format("Sucess") end).

-Craig



More information about the erlang-questions mailing list