Subject: Re: Q: on hashes and counting From: Erik Naggum <erik@naggum.net> Date: 2000/10/20 Newsgroups: comp.lang.lisp Message-ID: <3181073523983640@naggum.net> * The Glauber <theglauber@my-deja.com> | I still don't understand how this works. read-sequence returns a position, | not a string; "vendor" would be bound to the number 5, right? It doesn't work because I blew it. I have this nifty little Emacs hack that lets me edit Lisp code in an indirect buffer, but I must have posted the code I jotted down first and discarded the code that worked after improvements and testing. The real code goes like this: (let ((vendor (make-string 5))) (read-sequence vendor stream) ... The return value from read-sequence is discarded because it may be less than 5 only when the end of the file has been reached, and then we're going to hit the real end of file in the next read operations, so testing for zero would have been necessary, but only a waste. I have long been annoyed that read-sequence returns 0 on end of file. That kind of braindamaged conflation between a "no can do" whine (useless return value) and "read past the end of the file" condition doesn't belong in a programming language, but rather in some underdesigned little toy operating system like early 1970's Unix. *sigh* #:Erik -- I agree with everything you say, but I would attack to death your right to say it. -- Tom Stoppard