receive after

Bjorn Gustavsson bjorn@REDACTED
Tue May 31 13:15:50 CEST 2005


Thanks!

The example will be corrected in R10B-6.

/Bjorn

Dietmar Schaefer <dietmar@REDACTED> writes:

> 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
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list