You didn't say how you want to get out of the loop, but...

Here are three possibilities:

   repeat while true
     -- Make sure you have a way to get out!  This will go on forever
     repeat with thisItem in myList
        -- do something with thisItem
     end repeat
   end repeat

Or this variation:

   repeat while true
      numElements =count(myList)
      repeat with x=1 to numElements
         -- do something with myList[x]
      end repeat
   end repeat

Or this way:

    index =1
    numElements =count(myList)
    repeat while true
       -- do something with myList[index]
       index =index + 1
       if (index > numElements) then
         index =1
       end if
    end repeat

They're all more or less the same thing.  The first one doesn't give you 
access to your current index, though - that's all.

- Tab

At 06:47 PM 10/11/00 +0000, JUAN COLON wrote:
>hi everyone,
>
>how do you loop a list? say when the list reaches the last number.
>
>thanks.
>
>JUAN-NYC
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at 
>http://profiles.msn.com.
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to