[mercury-users] [Feature request] Printing reasonable floats/printer pred

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Mon Feb 12 12:08:10 AEDT 2007


Dear all, I wrote and Julian responded:

>> Is it possible to set some value in the io state to control how
>> float is printed?
>Nobody has responded, so: AFAICT, no.  My quick research showed
>that: [snip]

Therefore I have a feature request, which is that the precision of
floats be part of io.state accessable to the user, so that write/[3,4]
prints a float based on this value.

Or, if you wish to go all the way (which I find desireable), then io.state
should have a printer predicate slot that for any type T write/[3,4]
prints T in the format specificed by the particular clause associated
with that type (defaulting to what write does if this predicate fails).
This solves the first request, and is much more general, but I'll be
happy with the first if that's all that can be done presently.

Sincerely,
Doug Auclair

--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list