develooper Front page | perl.perl5.porters | Postings from May 2001

Re: [ID 20010529.006] String plus zero inconsistent across platforms

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
May 31, 2001 05:19
Subject:
Re: [ID 20010529.006] String plus zero inconsistent across platforms
Message ID:
20010531071721.U13243@chaos.wustl.edu
On Thu, May 31, 2001 at 03:51:54AM +0100, Hugo wrote:
> In <20010530211133.Q13243@chaos.wustl.edu>, Jarkko Hietaniemi writes:
> :Something like this would 'fix' the problem but I'm not certain
> :whether this is the right thing to do.  Do we want "0x10" + "010" + "0b10"
> :to produce 26, and if so, with or without warnings?
> 
> I don't think we do: for a long time we have taught people that "37xa"
> numifies to 37, and I think it is unreasonable and unhelpful now to
> change "0xa" to numify to something other than 0. I think your example
> should numify to 0 + 10 + 0 = 10.

Well, in that case we must go in the other direction and stop some
Atof()s from numifying "0xa" to 10.

> Hugo

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

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