|
From: Ethan M. <merritt@u.washington.edu> - 2005-11-15 19:46:23
|
On Tuesday 15 November 2005 11:27 am, Juergen Wieferink wrote:
> > There really needs to be a way to escape quote characters.
> I tend to disagree. The main advantage of 'these strings' (like
> they are understood by the majority) compared to "these" is that
> backslashes don't have a special meaning and can be easily used.
> The drawback is the unavailability of certain characters ('\n', '\t'
> '\r', octal codes, and '\''). With your approach, you have to
> resort to double quoted strings just to be able to have a trailing
> backslash.
Not really. IMHO it should behave as in the perl documentation
you quote below. If you want a trailing backslash, then you have
to escape the backslash:
foo = 'c:\\'
Yes, I know this is not what the current code does and it will
break all the existing backslash uses in single quotes. So we
won't even consider it. But that's what it should have been :-)
I'm dropping out of this discussion.
I truly don't care which way this goes.
> *Perl* seems to work very much like you suggested. "man perldata":
>
> String literals are usually delimited by either single or double
> quotes. They work much like quotes in the standard Unix shells: dou-
> ble-quoted string literals are subject to backslash and variable sub-
> stitution; single-quoted strings are not (except for "\'" and "\\").
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|