We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code
load "Time"; Time.fmt ~1 (Time.now());
should raise the Size exception, but does not in Moscow ML. The simple fix is to change lines 37-38 of Time.sml to
Size
fun fmt p r = Real.fmt (StringCvt.FIX (SOME p)) (r/1000000.0);
since Real.fmt raises Size on invalid precision specifications.
Real.fmt
A better fix is
fun fmt p = if (p < 0) then raise Size else (fn r => Real.fmt (StringCvt.FIX (SOME p)) (r/1000000.0))
since it is consistent with how Real.fmt treats invalid format specifications.
The text was updated successfully, but these errors were encountered:
Raise Size exception from Time.fmt
9d295e6
This applies changes suggested by @JohnReppy to fix issue kfl#36
kfl
No branches or pull requests
The code
should raise the
Size
exception, but does not in Moscow ML. The simple fix is to change lines 37-38 of Time.sml tosince
Real.fmt
raisesSize
on invalid precision specifications.A better fix is
since it is consistent with how
Real.fmt
treats invalid format specifications.The text was updated successfully, but these errors were encountered: