[erlang-questions] Reading, Learning, Confused
Sean Allen
sean@REDACTED
Sat Jul 19 17:05:14 CEST 2008
On Jul 19, 2008, at 10:55 AM, Edwin Fine wrote:
> I cannot imagine of any situation where or and orelse work the same
> and reinstalling changes that. Please could you paste your exact
> code and shell session, showing the problem? Also, which version of
> Erlang are you using?
ok i reinstalled and:
Eshell V5.5.5 (abort with ^G)
1> X = 0.
0
2> (X == 0 ) or (1/X > 2).
=ERROR REPORT==== 19-Jul-2008::11:02:12 ===
Error in process <0.30.0> with exit value: {badarith,[{erlang,'/',
[1,0]},{erl_eval,do_apply,5},{erl_eval,expr,5},{erl_eval,expr,5},
{shell,exprs,6},{shell,eval_loop,3}]}
** exited: {badarith,[{erlang,'/',[1,0]},
{erl_eval,do_apply,5},
{erl_eval,expr,5},
{erl_eval,expr,5},
{shell,exprs,6},
{shell,eval_loop,3}]} **
3> (X == 0 ) orelse (1/X > 2).
true
which makes a lot more sense. i have no idea why or and orelse where
the same before.
which leaves the question ( after answering a lot of confusion )...
why would you want to use
or
instead of
orelse
?
More information about the erlang-questions
mailing list