|
From: Petr M. <mi...@ph...> - 2005-11-15 13:43:30
|
>> 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. > > No, the bug is that the command > > b = 'foo\'bar' > > was accepted in the first place. It should have flagged a syntax error. Consequently, we have two possibilities: 1. \ is always \ in 'strings'; however, there is no possibility to type in a quote ' This helps writing e.g. 'cd C:\tmp\' 2. there is only one escape possibility inside 'string': \' means ' Currently, gnuplot uses option 2. but docs tends to 1, so it is an open question what to fix. If people say escape \' is usual in other languages, I would vote for 2. Then, docs should include an explicit help for 'cd c:/tmp/' for Windows users. --- PM |