From: David E. Duman
Subject: help... I need to put " in a file
Date: 
Message-ID: <59c87d$ic1@news.ysu.edu>
I am new to lisp (common lisp), and I am writing a program
that needs to print the single and double quote characters
into a file.  I can't find the filter or anything like that
to allow me to simply write such things.  

If anyone has some ideas on that, I would appreiate a reply.

Thanks in advance:
----------------------------
·····@clem.mscd.edu
-- 
David Duman
Denver, CO
·····@yfn2.ysu.edu

From: Will Ware
Subject: Re: help... I need to put " in a file
Date: 
Message-ID: <E2p9tp.nA@world.std.com>
David E. Duman (·····@yfn.ysu.edu) wrote:

: I am new to lisp (common lisp), and I am writing a program
: that needs to print the single and double quote characters
: into a file.  I can't find the filter or anything like that
: to allow me to simply write such things.  

In gcl:
>(format t "'")      
'
NIL

>(format t "~a" #\")                     
"
NIL

>(format t "~c" #\")  
"
NIL

I would have hoped for a cleaner way to do the double-quote, but
looking thru CLTL2, I don't see one. As far as printing this stuff
to files, change "format t" to "format outfile" where "outfile" is
a stream created with the "open" command. Best of luck.
-- 
-------------------------------------------------------------
Will Ware <·····@world.std.com> web <http://world.std.com/~wware/>
PGP fingerprint   45A8 722C D149 10CC   F0CF 48FB 93BF 7289
From: Thomas A. Russ
Subject: Re: help... I need to put " in a file
Date: 
Message-ID: <ymig211c9s7.fsf@hobbes.isi.edu>
;; Option 1:
 (with-open-file (f "filename" :direction-output)
   (write-char #\' f)
   (write-char #\" f))

;; Option 2:
 (with-open-file (f "filename" :direction-output)
   (princ "'" f)
   (princ "\"" f))


-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Rainer Joswig
Subject: Re: help... I need to put " in a file
Date: 
Message-ID: <joswig-ya023180002012962203270001@news.lavielle.com>
In article <·········@world.std.com>, ·····@world.std.com (Will Ware) wrote:

> David E. Duman (·····@yfn.ysu.edu) wrote:
> 
> : I am new to lisp (common lisp), and I am writing a program
> : that needs to print the single and double quote characters
> : into a file.  I can't find the filter or anything like that
> : to allow me to simply write such things.  
> 
> In gcl:
> >(format t "'")      
> '
> NIL
> 
> >(format t "~a" #\")                     
> "
> NIL
> 
> >(format t "~c" #\")  
> "
> NIL
> 
> I would have hoped for a cleaner way to do the double-quote, but
> looking thru CLTL2, I don't see one. As far as printing this stuff
> to files, change "format t" to "format outfile" where "outfile" is
> a stream created with the "open" command. Best of luck.


For a character: (write-char #\")
For a string: (princ "\"")