coerce and exact operators problem

Matthias.Lang <>
Wed Jun 7 13:56:48 CEST 2000


Hi,

The bug you demonstrate doesn't appear to be present in R6B, so I'd
say it's a fixed bug. (I can reproduce it in R5b, but not in R6B). I
couldn't find that bug listed in the release notes, though the runtime
system release notes mention a fix for something similar.

Matt

Tony Pedley writes:

 > Excuse me for my stupidity but could anyone explain why the coerce 
 > and exact operators do not work as advertised....


 > 
 > % Surely one must match......
 > 
 > match(X) ->
 >     io:format("when X is ~p\nX==0 results in ~p\nX=:=0 results in ~p\n",[X,X==0,X=:=0]),
 >     if
 >        X == 0 ->
 >            coerce_match;
 >        X =:= 0 ->
 >            exact_match;
 >        true  ->
 >            no_match
 > end.
 > 
 > ------------------------------>
 > 
 > 41> tmp:match(0.0).
 > 
 > when X is 0.00000e+0,
 > X==0 results in true
 > X=:=0 results in false
 > no_match
 > 
 > 



More information about the erlang-questions mailing list