lua-users home
lua-l archive

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


My suggestion would be to add support for hex numbers in

luaV_tonumber and
luaO_str2d

So if a string starts with 0x it would be converted as a hexadecimal number
instead as a invalid string. I cannot see this would break any Lua language
definition since the converting right now is nil.

Example:

t = 45 * "0xFF"

This will also work with the lexer today.

/Erik

p.s. Then binary 0b would be piece of cake :-) for all the embedded people.