lua-users home
lua-l archive

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


>I'd like my users to be able to type in hexadecimal (and possibly binary) 
>constants in as painless a way as possible. Currently I have:
>
>  n = htoi("c3")
>
>which of course works fine, but makes complex expressions less readable for an 
>inexperienced user. 
>Is there a simpler way? I thought of:

How about n = HEX"c3" or simply n = X"c3", if you can spare the global X?
--lhf