Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

line-break string-literal

255 views
Skip to first unread message

Frode Vatvedt Fjeld

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to

Is it possible to line-break a string-literal in Common-Lisp, such
that the reader will recognize it as a single string?

--
Frode Vatvedt Fjeld

Erik Naggum

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to
* Frode Vatvedt Fjeld <fro...@acm.org>

| Is it possible to line-break a string-literal in Common-Lisp, such
| that the reader will recognize it as a single string?

if you want to know if newlines are allowed in string literals in Common
Lisp, the answer it yes, they are, and they need no special treatment.

#:Erik

Christopher R. Barry

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to
Frode Vatvedt Fjeld <fro...@acm.org> writes:

> Is it possible to line-break a string-literal in Common-Lisp, such
> that the reader will recognize it as a single string?

Newlines in a string literal won't break that string into two strings,
as you probably already know. I think what you meant to ask was if
there is a way to break a string into more than one line and have it
interpreted as if it were all on one line (insert non-literal
newlines, in other words). You can do this with FORMAT strings.

"foo bar ~
baz quux"

is equivalent to:

"foo bar baz quux"

See:

http://www.harlequin.com/education/books/HyperSpec/Body/sec_22-3.html

to have all the rules explained.

Christopher

0 new messages