[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: NUL byte in string literal
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 2 Apr 2018 14:43:03 +0200
2018-04-02 14:15 GMT+02:00 Albert Chan <albertmcchan@yahoo.com>:
> On Apr 2, 2018, at 5:58 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>
>> 2018-04-02 11:24 GMT+02:00 Matthew Wild <mwild1@gmail.com>:
>>> That leaves the only truly correct way of representing \0 (that
>>> doesn't depend on context) as \000.
>>
>> Not so. \x00 also works, and is IMHO preferable.
>>
>
> Agreed.
>
> lua decimal escape is easily confused with octal, especially with
> leading zero, like \012.
>
> Any other programming languages use decimal escapes ?
Pascal does, but the cute thing is that it isn't really an escape, it
sits outside the string quotes.
'this'#9'is'#13'OK'#8#8'allowed'#10