[erlang-questions] comma vs andalso
Richard Carlsson
richardc@REDACTED
Mon Jul 6 15:41:15 CEST 2009
Roberto Ostinelli wrote:
> let me point another (and correct) example then:
>
> foo(..) when X =/= 0 andalso 1/X > 0.1 -> ..
>
> the following expression would fail instead:
>
> foo(..) when X =/= 0, 1/X > 0.1 -> ..
Aye, but an exception in a guard test is always caught and
treated as if the test evaluated to "false". In this example,
there is no observable difference between the two.
/Richard
More information about the erlang-questions
mailing list