variable '_' is unbound

Lennart Öhman lennart.ohman@REDACTED
Tue May 28 08:36:08 CEST 2002


Hi,
the compiler complains because you are trying to use ==
for matching. In a test, both sides must be bound.

/Lennart

Vance Shipley wrote:
> 
> What is wrong with this:
> 
>         foo(Arg) when bar == Arg; <<_:16>> == Arg -> ok.
> 
> When I try to compile it I get:
> 
>         1> c(t).
>         ./t.erl:4: variable '_' is unbound
>         error
> 
> This is using R8B-1.
> 
>         -Vance


-------------------------------------------------------------
Lennart Ohman                   phone   : +46-8-587 623 27
Sjoland & Thyselius Telecom AB  cellular: +46-70-552 6735
Sehlstedtsgatan 6               fax     : +46-8-667 8230
SE-115 28, STOCKHOLM, SWEDEN    email   : lennart.ohman@REDACTED




More information about the erlang-questions mailing list