Correct syntax of a case clause

info info@REDACTED
Sun Jun 14 19:58:12 CEST 2009


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
end

(a,b) gives an error
What is the correct syntax ?

John


More information about the erlang-questions mailing list