Question on new line behavior
Jean Louis <[email protected]>
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
Hello, I am beginning user of CLISP, and I am going to stay long time with it. I do not get result as I expect it. Here is small snippet I use to insert some HTML quickly: wiki.cl https://en.wikipedia.org/wiki/CLISP CLISP Then I get output: <em>This article is licensed under the <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons Attribution-ShareAlike License</a>. It uses material from the <a href="https://en.wikipedia.org/wiki/CLISP">Wikipedia Article "CLISP "</a>.</em> </p> So I get newline after CLISP. This is now what I was expecting. I tried triming it. #!/usr/bin/clisp (unless (cadr *args*) (format t "~a~%" "No arguments specified.") (exit 1)) (defvar link (car *args*)) (defvar article (string-trim '(#\Space #\Tab #\Newline) (cadr *args*))) (format t "~a~a~a~a~a" "<p> <em>This article is licensed under the <a href=\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\">Creative Commons Attribution-ShareAlike License</a>. It uses material from the <a href=\"" link "\">Wikipedia Article \"" article "\"</a>.</em> </p>") However, if I connect the above format into: (format t "~a~a~a~a~a" "<p> <em>This article is licensed under the <a href=\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\">Creative Commons Attribution-ShareAlike License</a>. It uses material from the <a href=\"" link "\">Wikipedia Article \"" article "\"</a>.</em></p>") Then I get the output like: <em>This article is licensed under the <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons Attribution-ShareAlike License</a>. It uses material from the <a href="https://en.wikipedia.org/wiki/CLISP">Wikipedia Article "CLISP"</a>.</em></p> It is not logical to me why is this happening. Jean ------------------------------------------------------------------------------ _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list