[m-dev.] for review: string__fmt

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Aug 11 15:14:45 AEST 2000


On 11-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 	  As I understand things, the changes to string__format are indeed
> 	  such that they might well cause backwards compatiblity problems
> 	  for our existing users.  Is that correct?

I looked into this a little more, and it seems that the old string__format
had several undocumented differences from printf():

	- For the old string__format, the default precision was 15
	  (i.e. the number of significant figures in an IEEE double
	  precision float), but for ISO C's printf(), the default
	  precision is 6.

	- For the old string__format, for the e, E, f, F, g and G conversions,
	  the "precision" field in the format always specified the
	  number of significant figures, but for ISO C's printf(), the
	  precision only specifies as the number of significant
	  figures for the g and G conversions, whereas for the e, E,
	  f, and F conversions the precision specifies the number of
	  digits after the decimal point.

I think these changes are significant enough that they are indeed
likely to cause backwards compatibility problems for some users.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list