stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: %{Ao}, %{Ad}, and %{Ax} directives
Date Wed, 14 May 2008 05:28:49 GMT
Eric Lemings wrote:
> All of the test cases for the %{Ao}, %{Ad}, and %{Ax} directives (in
> 0.printf.cpp) specify a width (width of integer elements to be exact).
> Does this mean the width is required?  I can't easily discern this by
> reading the code.

I don't know off the top of my head but from the output of
the program below (on x86 hardware) I'm guessing the default
width is 1 and the precision is taken to be the number of
initial non-zero elements of the array (each of the given
width). It might be worthwhile to enhance the test to
exercise this.

$ cat t.cpp && ./t
#include <rw_printf.h>

int main ()
     const int a [] = { 0x12345678, 0 };
     rw_printf ("%{Ax}\n", a);


View raw message