|
From: Hans-Bernhard B. <br...@ph...> - 2005-11-15 11:24:06
|
Ethan Merritt wrote: > \' or \" are not "special characters", they are escaped quotes. > If you do not allow some mechanism for escaping quotes, then you > cannot represent a quote inside a quoted string. The mechanism for escaping quotes in gnuplot is to use a double-quoted string and use backslash escapes. There is neither a need for supporting backslash escapes in single-quoted strings, nor does the documentation even suggest such a thing, anywhere. > gnuplot> a = "foo\"bar" > gnuplot> print a > foo"bar > > gnuplot> b = 'foo\'bar' > gnuplot> print b > foo\'bar > > If there is a bug here, it is not the fact that the backslash > escapes the single-quote. It is that the print routine should > know enough not to _print_ the backslash in such a case. No, the bug is that the command b = 'foo\'bar' was accepted in the first place. It should have flagged a syntax error. |