From: Sungwoo Lim
Subject: What is wrong with this LOOP?
Date: 
Message-ID: <050720011253404019%sungwoo@cad.strath.ac.uk>
Hello,

I expected a limited loop result from the following example, but I got
the endless loop. What is wrong with this LOOP?
Why this loop does not terminated?
Do I need to use WHILE in somewhere to terminate this loop?
Thanks for your help.

Sungwoo

;--------------------
(defun test ()
  (setf this 0)
  (loop for iv from 0 to 5
        do (loop for jv from 0 to 5
                 when (/= jv iv)
                 do (loop for kv from 0 to 5
                          when (and (/= kv iv) (/= kv jv))
                          do (loop for ax in '(stix enix)
                                   and ay in '(stiy eniy)
                                   do (loop for bx in '(stjx enjx)
                                            and by in '(stjy enjy)
                                            do (loop for cx in '(stkx
enkx)
                                                     and cy in '(stky
enky)
                                                     do (print this)
                                                        (incf
this))))))))
From: Sungwoo Lim
Subject: Re: What is wrong with this LOOP?
Date: 
Message-ID: <050720011405223765%sungwoo@cad.strath.ac.uk>
Finally, I managed it. =)
After restart my computer and MCL, it works properly.
Hmm strange... 

Sungwoo




In article <··························@cad.strath.ac.uk>, Sungwoo Lim
<·······@cad.strath.ac.uk> wrote:

> Hello,
> 
> I expected a limited loop result from the following example, but I got
> the endless loop. What is wrong with this LOOP?
> Why this loop does not terminated?
> Do I need to use WHILE in somewhere to terminate this loop?
> Thanks for your help.
> 
> Sungwoo
> 
> ;--------------------
> (defun test ()
>   (setf this 0)
>   (loop for iv from 0 to 5
>         do (loop for jv from 0 to 5
>                  when (/= jv iv)
>                  do (loop for kv from 0 to 5
>                           when (and (/= kv iv) (/= kv jv))
>                           do (loop for ax in '(stix enix)
>                                    and ay in '(stiy eniy)
>                                    do (loop for bx in '(stjx enjx)
>                                             and by in '(stjy enjy)
>                                             do (loop for cx in '(stkx
> enkx)
>                                                      and cy in '(stky
> enky)
>                                                      do (print this)
>                                                         (incf
> this))))))))