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

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

Thread Previous | Thread Next
From:
hv
Date:
January 16, 2003 08:53
Subject:
Re: [perl #20339] Possible sprintf problem in perl5.8.0
Message ID:
200301161655.h0GGt6W02987@crypt.compulink.co.uk
Jason Lee (via RT) <perlbug-followup@perl.org> wrote:
:After compiling and installing perl 5.8.0 without any problems I have
:encountered some weird behaviour with sprintf.
:
:This was highlighted by a failing "make test" of Text-Autoformt-1.04 module
:and later by some simple sprintf examples which can all be found as detailed
:below.
[...]
:Simple example
:
:# perl -e 'print sprintf "%6.2lf\n", 1;'
:%6.2lf
:# perl -e 'print sprintf "%6.2f\n", 1;'
:  1.00

One of the side-effects of improvements to the sprintf code for 5.8.0
was stricter checking of size modifiers.

The docs for my local C library sprintf suggest that the "l" modifier
is relevant only for integer conversions and the "s" and "n" formats;
long doubles should be requested using "L", "q" or "ll". Do you have
reason to believe that "l" should also be supported? If not, I'd
suggest that Text-Autoformat may be wrong here.

Hugo

Thread Previous | Thread Next


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