lua-users home
lua-l archive

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

> I'm using Lua a lot for embedded software, which tends to involve quite
> a bit of working with low-level protocols, bits and binary data. One of
> the things I'd personally like to see added in Lua to make my life a bit
> easier is the C-like notation for 'binary' data in strings using
> hexidecimal escape codes like \xNN.

Probably this is a silly question, but is decimal notation not
acceptable? I guess hexadecimals may be a bit more convenient in some
cases, but they should be more or less equivalent.

To quote manual:

    A character in a string can also be specified by its numerical value
    using the escape sequence \ddd, where ddd is a sequence
    of up to three decimal digits.