lua-users home
lua-l archive

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


> where X is a *function* which is easy (if boring) to write (use gsub!)

In Lua 3.1 you can use tonumber to do the job:

       function X(s) return tonumber(s, 16) end

After this line, the "notation" sugested by lhf is working:

       a = X'a67'
       print(a+X'00ff')

-- Roberto