develooper Front page | perl.perl5.porters | Postings from February 2003

Re: [perl #20339] Possible sprintf problem in perl5.8.0

Thread Previous
February 10, 2003 19:07
Re: [perl #20339] Possible sprintf problem in perl5.8.0
Message ID:
On Mon, 10 Feb 2003 23:23:11 +0000, wrote:
> (Yitzchak Scott-Thoennes) wrote:
>:The following combinations must be supported per C99:
>:modifier                           format                               
>:h,hh,ll,j,z,t                      d,i,o,u,x,X,n
>:l                                  d,i,o,u,x,X,n,c,s,a,A,e,E,f,F,g,G
>:L                                  a,A,e,E,f,F,g,G
>Hmm, we haven't heard of half of those.
>The code currently checks for these modifiers:
>  I    only if defined(WIN32)
>  I32  only if defined(WIN32)
>  I64  only if (defined(WIN32) && defined(WIN64))
>  L    only if (defined(HAS_QUAD) || defined(HAS_LONG_DOUBLE))
>  q    only if defined(HAS_QUAD)
>  l
>  ll   only if (defined(HAS_QUAD) || defined(HAS_LONG_DOUBLE))
>  h
>  V
>Can you explain what those others do?

hh: cast to signed or unsigned char before printing
j:  expect intmax_t or uintmax_t
z:  expect size_t
t:  expect ptrdiff_t

Don't know how to map any of those onto perl (except perhaps hh).

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About