[Developers] quoting in ccl-file strings
Jonathan Thornburg
jthorn at aei.mpg.de
Fri Jun 3 10:13:55 CDT 2005
In a recent message to this list, I proposed the 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
for string quoting in par files.
In this message I'd like to address the related issue of string quoting
in ccl files. As a design principle, I'd say it makes sense to use a
consistent set of rules across all of Cactus, i.e. I'd like to propose
the same set of rules for CCL files.
As an implementation bug... try putting the string
"compute $\partial_x \beta$"
in a CCL string, and you'll discover that the current CST dumps that
verbatim into a C string... and \p and \b aren't legal in a C string.
Oops.
ciao,
--
-- Jonathan Thornburg <jthorn at aei.mpg.de>
Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
Golm, Germany, "Old Europe" http://www.aei.mpg.de/~jthorn/home.html
"Washing one's hands of the conflict between the powerful and the
powerless means to side with the powerful, not to be neutral."
-- quote by Freire / poster by Oxfam
More information about the Developers
mailing list