lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I used  5.0.2 so i noticed there the lack of hex, My instinct told me
to look for hex in the lexer of the new release... as read_numeral()
there would not take an hex I assumed lua didn't so I changed it...

Good thing there's hex already, It was fun anyway going back to the
basics so it wasn't a complete loss of time.


On 2/9/06, Mike Pall <> wrote:
> Hi,
> LEGO wrote:
> > the following patch against lua-5.1-rc3 allows the lexer to recognize
> > hexadecimal numerals in the form 0xa1234
> Umm ... have you checked whether plain Lua already supports
> this? :-)
> $ lua51rc3 -e 'print(0xff)'
> 255
> See:
> for an explanation and a (IMHO) better/simpler patch which makes
> hex numbers work with non-C99 libraries, too (MSVC for Windows).
> PS: Reread the CPP docs, too. '#if foo == bar' is always true.
>     CPP has no idea of C types and doesn't do string compares.
>     Unknown tokens evaluate to 0.
> Bye,
>      Mike

This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan