A Slightly More Complicated File Example
This example shows how to open a file, read each Lisp expression from the file and print it. It demonstrates the use of files and the use of the optional "stream" argument to the READ
function.
(do* ((fp (open "test.dat" :direction :input))
(ex (read fp nil) (read fp nil)))
((null ex) (close fp) nil)
(print ex))
The file will be closed with the next garbage collection.
XLISP-PLUS - Version 2.1g - Tom Almy
tom.almy@tek.com - 18 JUL 94
Generated with WebMaker