lua-users home
lua-l archive

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


> Is this defined or undefined behavior in Lua 5.1?
> 
>   assert( "\x10" == "x10" ) -- not [[\x10]]
>   assert( "\;" == ";") -- not [[\;]]

Undefined because the manual does not list \x as an escape sequence.
The current implementation does ignore the \ in this case, but that
should not be relied upon.

Anyway, the manual seems pretty clear to me:

  Literal strings [...] can contain the following C-like escape sequences: 

The key word here is "the".