From: Hans-Bernhard B. <br...@ph...> - 2005-11-14 09:38:48
|
Juergen Wieferink wrote: > "help syntax quotes" only says that there is no backslash processing > of special characters. No such thing as 'help syntax quotes' in the 4.0 documentation. And no mention of 'special characters' either. Here's the actual text: --- from 'help syntax', version 4.0: --- Text may be enclosed in single- or double-quotes. Backslash processing of sequences like \n (newline) and \345 (octal character code) is performed for double-quoted strings, but not for single-quoted strings. --- I see no justification here for applying backslash-escaping to \' inside a single-quoted string. If no other sequence is escapable inside '', why should \' be the only exception, and then not even be documented? This is clearly a non-documented, completely surprising feature. If that doesn't qualify it as a bug, I don't see what could. > The behaviour you show is exactly the same as raw strings in > python. [With the exception that gnuplot silently terminates strings > at the end of the line.] Really. Backslashes are used as escape > characters and nevertheless taken into the string. Not at the same time they aren't. It's either-or. Either your in a double-quoted string, then backslashes are used as escape characters, or you're in a single-quoted string, then they're kept as they are. It's as simple as that --- or at least it's supposed to be. |