[m-dev.] string_format_tests

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Nov 21 23:18:25 AEDT 2002


On 21-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> Do you have a copy of the ANSI standard where you can check which flags are
> valid with which type specifiers?

Sure.

# is valid for o, x, X, e, E, f, g, G, undefined behaviour for others.

0 is valid for d, i, o, u, x, X, e, E, f, g, and G, undefined behaviour
  for others.

- is valid for all specifiers

+ is defined for "signed conversions", which I guess is d, i, e, E, f, F, g.
  Valid (but has no effect) for others.

The h, l, and L flags are not relevant, since we don't support those.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- 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