[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tonumber() on negative hexadecimal strings
- From: Adam Strzelecki <ono@...>
- Date: Thu, 21 Apr 2011 12:25:21 +0200
> Perhaps an option to say in docs that the result on negative values with bases other than 10 is "application-dependent", or "undefined". (Not that I like it).
This will render tonumber() IMHO useless for parsing numbers at all, as it may accept random junk that happens to look like negative non-10 base number and return non-nil value, which indicates that the number is correct.
Regards,
--
Adam Strzelecki