From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.nikoma.de!tiscalinetde!newsfeed.Austria.EU.net!newsfeed.kpnqwest.at!nslave.kpnqwest.net!nloc.kpnqwest.net!nmaster.kpnqwest.net!nreader3.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: assignment to iteration control variables in loop? References: <87vgcti5cd.fsf@nkapi.internal> Mail-Copies-To: never From: Erik Naggum Message-ID: <3223201071978240@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 28 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 20 Feb 2002 13:37:48 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader3.kpnqwest.net 1014212268 193.71.199.50 (Wed, 20 Feb 2002 14:37:48 MET) NNTP-Posting-Date: Wed, 20 Feb 2002 14:37:48 MET Xref: archiver1.google.com comp.lang.lisp:26930 * Bulent Murtezaoglu | I have spent some time reading the Hyperspec section 6.1 but was unable | to find whether assignment to iteration control variables in the body is | allowed. More important than "allowed", what would you want it to mean? Is an assignment likely to have only one possible meaning or multiple? If the latter, common sense dictates that you do not use such assignment. If you assume that it has only one possible meaning, this can be refuted by experiment with existing implementations. | I don't want to do this, I just want to see if the loop macro can | legally infer the type (and thus insert a declaration) (integer 1 10) | from that for clause. That certainly seems warranted _unless_ some form in the body of the loop assigns to the variable. If the variable binding is special, I think it is unwarranted to make any sort of declaration. | Is there verbiage that proscribes assignment to these variables (like | there is for object traversing)? Not that I know of. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.