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

[perl #122856] Inconsistent string vs number handling for chr(Inf)

Thread Previous | Thread Next
Father Chrysostomos via RT
September 27, 2014 05:25
[perl #122856] Inconsistent string vs number handling for chr(Inf)
Message ID:
On Fri Sep 26 14:03:50 2014, jhi wrote:
> On Friday-201409-26, 16:49, Father Chrysostomos (via RT) wrote:
> > "Inf" and 0+Inf have the same numeric and string representations, so
> > chr should treat them the same way.  Either we should revert to
> > treating inf as 0 (or 0xff, whichever), or make chr("Inf") die, too.
> Death.

This is more exciting than I thought:

$ perl5.21.5 -le 'print pack "A3", 0+inf'
Cannot pack Inf with 'A' at -e line 1.

That one shouldn’t be sentenced.

I probably won’t get my patch written tonight, because it’s more involved than I realised.  But I’m working on it....


Father Chrysostomos

via perlbug:  queue: perl5 status: open

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