[mercury-users] floating point number interpreted as ./2 for some reason

David Overton dmo at cs.mu.OZ.AU
Fri Apr 27 14:16:54 AEST 2001


On Thu, Apr 26, 2001 at 06:34:53PM -0700, Terrence Brannon wrote:
> 
> [localhost:~/src/mercury/sqrt] metaperl% mmc -E --infer-all sqrt.m
> sqrt.m:080: In clause for predicate `sqrt:main/2':
> sqrt.m:080:   error: undefined symbol `./2'.
> [localhost:~/src/mercury/sqrt] metaperl% 
> 
> ===== here is line 80:
> 
> 	{ if ArgV = [Arg1 | _] then string__to_float(Arg1,X) else (X = 12.0) },

The error message is somewhat confusing.  It is not actually referring
to the '.' in the floating point number, but to the list contructor.
"[Arg1 | _]" is just syntactic sugar for ".(Arg1, _)" and the
constructor '.' is not defined because you have not imported the list
module.


David
-- 
David Overton      Department of Computer Science & Software Engineering
PhD Student        The University of Melbourne, Victoria 3010, Australia
+61 3 8344 9159    http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list