[MLton-devel] Porting from Moscow ML

Stephen Weeks MLton@mlton.org
Mon, 23 Sep 2002 17:11:36 -0700


> By the way, I discovered an annoying difference between MLton and
> Moscow ML, which has to do with the way they print real numbers.
> 
> The following in Moscow ML
> 
> - Real.fmt (StringCvt.FIX (SOME 3)) 1.0;
> > val it = "1.000" : string
> 
> comes out as "1.0" in MLton. Is the standard ambiguous on this, or is
> one of the ML implementations deviant?

The standard seems clear to me, and MLton is deviant.  This problem is
documented in the Unresolved Bugs section of the MLton User Guide.  It
happens because we use C's sprintf to do our real-to-string
conversions, and sprintf doesn't do the same thing as the Basis
Library spec.

It's been on our todo list for years to fix this problem, so I don't
expect it to go away anytime soon.  Sorry.

Anyone out there on the MLton mailing list wanna take a crack at it?


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel