[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: hex numerical literals in 5.1
- From: Doug Rogers <rogers@...>
- Date: Thu, 22 Dec 2005 13:28:34 -0500
Rici Lake wrote:
> function X(str) return tonumber(str, 16) end
> print(X"2A")
That's a good solution. Very few down sides (X in the global table,
extra string literals).
The patch also provides for hexadecimal escape characters within
strings; it sounds like Todor does not need that. I find it to be very
useful, though there are Lua ways around that, too. If you don't need
speed and you don't have a problem with the overhead involved, stick
with the Lua-only solutions.
Doug
--
--__-__-____------_--_-_-_-___-___-____-_--_-___--____
Doug Rogers - ICI - V:703.893.2007x220 www.innocon.com
-_-_--_------____-_-_-___-_--___-_-___-_-_---_--_-__-_