Newsgroups: comp.lang.lisp
From: The Glauber <theglau...@my-deja.com>
Date: 2000/06/22
Subject: Re: Newbie asking for help
[...]
> ;; count number of lines in file key.html [...] > (with-open-file (ifile "key.html" :direction :input) > (setf nlines 0) > (loop > (if (read-line ifile nil) > (setf nlines (+ 1 nlines)) > (return nlines)))) > It doesn't work (it just hangs, so i think it's stuck in the loop). I OK. Using TRACE, i found that read-line wasn't returning nil, but ;; count lines And it works... And, of course, this works too: (with-open-file (ifile "key.html" :direction :input) So, i plod along, undaunted... -- Sent via Deja.com http://www.deja.com/ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||