[erlang-questions] receive doesn't work well in shell

Jani Hakala jahakala@REDACTED
Sat Apr 21 20:39:40 CEST 2007

"June Kim" <juneaftn@REDACTED> writes:

> It looks like using receive expression in the shell is valid and
> proper. However, its behaviour is different from what I expected.

> get()->receive V->V end.
> ==================
No trouble here because V is unbound before the receive.

> Why does the receive block on the input line 7? What's different to
> calling test1:get/0?
V is bound to integer value 4 before the second receive. It doesn't
match to integer value 5.

Jani Hakala

More information about the erlang-questions mailing list