<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Excuse me for my stupidity but could anyone explain why the coerce and
exact operators do not work as advertised....
<p>% Surely one must match......
<p>match(X) ->
<br> io:format("when X is ~p\nX==0 results in ~p\nX=:=0
results in ~p\n",[X,X==0,X=:=0]),
<br> if
<br> X == 0 ->
<br> coerce_match;
<br> X =:= 0 ->
<br> exact_match;
<br> true ->
<br> no_match
<br>end.
<p>------------------------------>
<p>41> tmp:match(0.0).
<p>when X is 0.00000e+0,
<br>X==0 results in true
<br>X=:=0 results in false
<br>no_match
<br>
<br>
<pre>--
______________________________________________________________________
Tony Pedley <A HREF="mailto:tonyp@terminus.ericsson.se">mailto:tonyp@terminus.ericsson.se</A>
Ericsson Intracom Ltd. Intranet : <A HREF="http://intracom.ericsson.se">http://intracom.ericsson.se</A>
1 Bede Island Internet : <A HREF="http://www.ericsson.co.uk/datacom/index.htm">http://www.ericsson.co.uk/datacom/index.htm</A>
Leicester memoID : ECOM.CBERAM
England Tel : +44 (0)116 2 542 400
LE2 7EU Fax : +44 (0)116 2 046 111
______________________________________________________________________</pre>
</html>