> -----Original Message-----
> From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
> Sent: Tuesday, May 13, 2008 11:29 PM
> To: [email protected]
> Subject: Re: %{Ao}, %{Ad}, and %{Ax} directives
> 
> 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.

Exactly what I was thinking.

Brad.

> 
> $ cat t.cpp && ./t
> #include <rw_printf.h>
> 
> int main ()
> {
>      const int a [] = { 0x12345678, 0 };
>      rw_printf ("%{Ax}\n", a);
> }
> 78,56,34,12
> 
> Martin
> 

Reply via email to