[Developers] quoting in par-file strings
Tom Goodale
goodale at cct.lsu.edu
Fri Jun 3 10:20:18 CDT 2005
Hi,
On Fri, 3 Jun 2005, Jonathan Thornburg wrote:
> Ok, here are my proposed string quoting rules:
> * A string is delimited by either single-quotes ('...')
> or double-quotes ("...").
> * Within a string delimited by single-quotes, double-quotes may be
> used with no need for special quoting
> * Within a string delimited by double-quotes, single-quotes may be
> used with no need for special quoting
> * Backslash quotes the next character, i.e.
> * \' gives a single-quote character without delimiting the string
> * \" gives a double-quote character without delimiting the string
> * \\ gives a backslash character in the string
>
>
> With these rules, my example string could be assigned to a parameter via
>
> MyThorn::MyPar = "default='order=5' matter='order=2 limiter=\"Van Leer\"'"
>
>
> Comments?
This looks good, however it would be even easier to have strings just
delimited by double quotes, and then the quoting rules you describe. What
is the advantage of having two different delimiters ?
Tom
More information about the Developers
mailing list