Front page | perl.perl5.porters |
Postings from April 2001
Re: sprintf and SFIO
Thread Previous
From:
Nicholas Clark
Date:
April 27, 2001 11:18
Subject:
Re: sprintf and SFIO
Message ID:
20010427191812.R88186@plum.flirble.org
On Fri, Apr 27, 2001 at 11:34:38AM -0400, Chris Nandor wrote:
> OK, I have noticed (and found in the p5p archives some discussion of) bad
> behavior of SFIO with sprintf.
>
> As was discovered this morning, but perhaps not popularly know, the e/f/g
> formats are passed to the local sprintf for processing. Hence, some
> problems with e/f/g. :-)
>
> In op/sprintf.t, there are four tests that have problems for me (with
> MacPerl 5.6.1a1).
>
> >%.0f< >0.6< >1< >Known to fail with sfio and
> >(irix|nonstop-ux|powerux)<
> >%.0f< >-0.6< >-1< >Known to fail with sfio and
> >(irix|nonstop-ux|powerux)<
> >%012.9g< >12345.6789< >0012345.6789<
> >%013g< >1234567.89< >001.23457e+06<
>
> The first two, as stated above, are known to fail with SFIO (1999). The
> other two have no such comments.
>
> The results are as follows:
>
> 0
> -0
> 12345.6789
> 1.23457e+06
>
> So questions:
>
> * Does anyone else see the problems with %g and SFIO? I could find no
> mention of them as problems elsewhere.
I do not remember seeing them on x86 linux
> * Do these problems still show up in SFIO 2000?
I believe not. I don't remember being surprised by tests failing.
I suspect that the first two don't fail. Do you have a small C program to
demonstrate the 4 cases to hand? [faster than compiling a perl]
Nicholas Clark
Thread Previous