Subject: [clisp-list] Unexpected behaviour when writing multi-line strings

From: Carlo Traverso <[email-masked]>
Date: Sun Mar 23 23:31:03 2003

It seems that when printing a string with an embedded newline, an
additional newline is printed before:

[6]> (progn (princ "a")(princ (coerce '(#\b #\newline #\c) 'string))
(princ "d"))
a
b
cd
"d"
[7]> (format nil "~A~A~A" "a"  (coerce '(#\b #\newline #\c) 'string)
"d")
"a
b
cd"

(I would expect
"ab
cd"
)

etc.

Is this a (documented) feature? I have not found a justification,
neither in the clisp doc nor in the HyperSpec.

ct@localhost:$:traverso:[1001]->clisp --version
GNU CLISP 2.30 (released 2002-09-15) (built 3252712513) (memory 3252712929)
Features: 
(CLOS LOOP COMPILER CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER SOCKETS
 GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI UNICODE BASE-CHAR=CHARACTER PC386
 UNIX)

Carlo Traverso

---

From: Sam Steingold <[email-masked]>
Date: Mon Mar 24 06:50:15 2003

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Unexpected behaviour when writing multi-line strings"
> * Sent on Mon, 24 Mar 2003 08:30:04 +0100
> * Honorable Carlo Traverso <[email-masked]> writes:
>

<http://clisp.cons.org/impnotes.html#ppr-first-newline>
<http://clisp.cons.org/impnotes/printer.html#ppr-first-newline>

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Save your burned out bulbs for me, I'm building my own dark room.