Re: [Rd] Line-terminal \ in character consants -- missing from ?Quotes ?

2023-02-12 Thread Duncan Murdoch
On 12/02/2023 12:07 a.m., Michael Chirico via R-devel wrote: I'm coming across some code that uses the fact the parser ignores a line-terminal '\', e.g. identical("\ ", "\n") # [1] TRUE x = "abc \ def" y = "abc \ndef" identical(x, y) # [1] TRUE However: identical("\\n", "\n") # [1] FALSE This

Re: [Rd] Line-terminal \ in character consants -- missing from ?Quotes ?

2023-02-12 Thread Michael Chirico via R-devel
I'm still hung up on ?Quotes -- I can't see mention of 'newline' as a valid escape. It mentions the literal sequence '\' 'n', where 'n' is being escaped. Glanced at the parser blame and apparently the terminal '\' is the older behavior, and what I'm used to, i.e. literal newlines in char constants