;;;  File: FileIO.lsp
;;; 
;;;  Demonstrate file input/output
;;; 
;;;  Author:  Bary W Pollack
;;;  Date:    Feb. 2, 2003
;;; 

;;;  --------------------------------------------------------------
;;;  Create an output file; output to it

(setq flotsam (open "iofile.lsp" :direction :output))

(print '(The current weaves in and out like a mist) flotsam)

(close flotsam)

;;;  --------------------------------------------------------------
;;;  Open an input file; input from it

(setq jetsam (open "iofile.lsp" :direction :input))

(print (read jetsam))

(print (read jetsam nil 'done))

(close jetsam)

;;;  --------------------------------------------------------------
;;;  The execution output is:
;;; (THE CURRENT WEAVES IN AND OUT LIKE A MIST)
;;; DONE
