develooper Front page | perl.perl5.porters | Postings from September 1999

Re: %#b format: bug?

From:
Gurusamy Sarathy
Date:
September 9, 1999 09:51
Subject:
Re: %#b format: bug?
Message ID:
199909091650.JAA01263@activestate.com
On Thu, 09 Sep 1999 10:58:50 +0300, Jarkko Hietaniemi wrote:
>Tom Christiansen writes:
> > But 
> > 
> >     printf "%#b\n", 181
> >     010110101
> > 
> > I should have expected 
> > 
> >     0b10110101
> > 
> > for that one.

This is a bug.

>                  And given this:
> > 
> >     printf "%#X\n", 181
> >     0XB5
> > 
> > This surprises me:
> > 
> >     printf "%#B\n", 181
> >     %#B
>
>Fixed now for _62.

But not this.  %X (and therefore %#X) makes sense given some hex
characters are alphabets.  One can't justify %B or %#B in the
same way.


Sarathy
gsar@activestate.com



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About