home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!news.columbia.edu!cunixb.cc.columbia.edu!rs69
- From: rs69@cunixb.cc.columbia.edu (Rong Shen)
- Subject: a problem with reading a stream
- Message-ID: <1992Dec27.014528.17943@news.columbia.edu>
- Sender: usenet@news.columbia.edu (The Network News)
- Nntp-Posting-Host: cunixb.cc.columbia.edu
- Organization: Columbia University
- Date: Sun, 27 Dec 1992 01:45:28 GMT
- Lines: 20
-
- Hi experts:
-
- I am trying to write a function that asks a path to a file
- from the user and opens the file to read. There is no problem with
- opening the file, but when it tries to read, the interpreter
- complains.
-
- Can anyone tell me why?
-
- Thanks very much.
-
- --
- rs69@cunixb.cc.columbia.edu
-
- (defun read-path ()
- (format t "Enter the path to the file to read, e.g. /tmp/foo/faq.txt")
- (setf file-path-name (read-line))
- (setf what-stream (open file-path-name :direction :input)) ; ok
-
- (read what-stream nil 'This-is-the-end-of-the-world)) ; This line has error;
-