[erlang-questions] Correct syntax of a case clause
Sun Jun 14 20:10:50 CEST 2009
If you have only a,b,c as possible matches, I'd do it like this:
case Expr of
c -> block2;
_ -> block1
> Hi All,
> How to formulate a "complex pattern" in a case clause ?
> case Expr of
> a,b -> block1; % if Expr = a or b then block1
> c -> block2 % if Expr = c then block2
> (a,b) gives an error
> What is the correct syntax ?
More information about the erlang-questions