Re: Platform-dependent variations in numeric conversions
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Platform-dependent variations in numeric conversions
- From: Ralph Hempel <rhempel@...>
- Date: 2008年6月15日 23:34:01 -0400
return tonumber('-0x12345678')
There is certainly some inconsistency there, and perhaps the Lua code
should detect the leading "-" sign, if it is going to do the hex
conversion itself.
I ran into this some time ago in testing my 32bit implementation
of Lua for the ARM7.
Lua does not handle a leading - in number conversions, it's
a unary minus operator as far as the parser is concerned.
Ralph