Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!linc.cis.upenn.edu!vinson From: vinson@linc.cis.upenn.edu (Jack Vinson) Newsgroups: comp.lang.lisp Subject: multiple use of with-open-file, or with-open-stream Message-ID: <45084@netnews.upenn.edu> Date: 24 Jun 91 14:16:42 GMT Sender: news@netnews.upenn.edu Organization: University of Pennsylvania Lines: 17 Nntp-Posting-Host: linc.cis.upenn.edu Hello again lisp.hackers, I am reading a bunch of data into lisp from a number of files which isn't that big of a deal, I can simply nest several with-open-file's. The problem occurs when I do not know, a priori, the number of data files from which I will be reading. i.e. That number is read in as well. Is there some way (a macro?) that I can get the functionality of with-open-file and with-open-stream without initially knowing how many files (or stream) I will have initially? My current solution is to open all the files, run the body of the program, and then close everything. This is fine, until my program bombs (and it's kinda large) and I have to remember to close out all the streams by hand. Jack Vinson vinson@linc.cis.upenn.edu