From: [Invalid-From-Line]
Subject: printing single charcters in lisp
Date: 
Message-ID: <4g2uat$rnh@darkstar.UCSC.EDU>
is there a command to print a single character using it's ascii value?
I want to print a end paren with quoting it, which means that princ or 
print or format won't help too much. I can't even seem to set a variable 
to the the value of the paren, because the cmucl interpreter recognizes 
the end paren as the end of an s-expression. Any help would be 
appreciated.
Send replies to ········@cats.ucsc.edu.

Thanks - Mikel Maron
From: Mikel Eruch Maron
Subject: Re: printing single charcters in lisp
Date: 
Message-ID: <4gas16$om1@darkstar.UCSC.EDU>
Thanks for all the help. Problem solved. Here's what I was working on, in case 
you're interested: a lisp procedure that prints out it's own instructions. It's
ugly, but it does the job.

Mikel

-----------
 
(defun printself ()
(let ((x))
(loop for counter from 3 downto 0
do (cond
((zerop counter) (progn (princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
nil))
((equalp counter 2)(princ x))
((equalp counter 1)(print x))
(t 
(setf x 
"(defun printself ()
(let ((x))
(loop for counter from 3 downto 0
do (cond
((zerop counter) (progn (princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
(princ (string (code-char 41)))
nil))
((equalp counter 1)(princ x))
((equalp counter 1)(print x))
(t 
(setf x" ))))))
NIL