Subject: [clisp-list] Bug in LOOP

From: "Thomas F. Burdick" <[email-masked]>
Date: Sat Oct 19 18:48:03 2002

I'm using CLISP 2.27.  I've noticed the following bug in CLISP's
handling of for-as-equals-then loop clauses:

(defun loop-for-as-equals-then-bug ()
  "According to the HyperSpec §6.1.2.1.4, in for-as-equals-then, var
  is initialized to the result of evaluating form1.  §6.1.7.2 says
  that initially clauses are evaluated in the loop prologue, which
  precedes all loop code except for the initial settings provided by
  with, for, or as.  However, in the example below, the initially
  clause is evaluated before X is initialized."
  (loop for x = 0 then (1+ x)
        initially (assert (zerop x))
        until (>= x 10)))

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'

---

From: Sam Steingold <[email-masked]>
Date: Wed Oct 30 07:40:06 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Bug in LOOP"
> * Sent on Sat, 19 Oct 2002 18:47:52 -0700
> * Honorable "Thomas F. Burdick" <[email-masked]> writes:
>

thanks - fixed in the CVS.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Microsoft: announce yesterday, code today, think tomorrow.