receive after
Dietmar Schaefer
dietmar@REDACTED
Tue May 31 12:51:04 CEST 2005
Hi !
I am just reading
http://www.erlang.se/doc/doc-5.4/doc/reference_manual/part_frame.html
Using a slight modified version from chapter
6.10 Receive
%%%-------------------------------------------------------------------
%%% File : test.erl
%%% Author : <dietmar@REDACTED>
%%% Description :
%%%
%%% Created : 31 May 2005 by <dietmar@REDACTED>
%%%-------------------------------------------------------------------
-module(test).
-export([test/0]).
test() ->
receive
onhook ->
io:format("onhook~n");
{connect, B} ->
io:format("connect~n"); <-----
after
60000 ->
io:format("timeout ~n")
end.
Trying to compile I get
erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import
+debug_info -o../ebin test.erl
./test.erl:19: syntax error before: 'after'
./test.erl:9: function test/0 undefined
removing the ; before after it works.
regards
Dietmar
More information about the erlang-questions
mailing list