Title: Re: using "repeat for each" when you don't want to start with the first line
Off the top of my head, here’s one approach -

put 1 into i
repeat for each line L in fld “Scene List”
  if i >= the selectedLine of fld “Scene List” then

    do stuff (note that the current line is in the variable L)

  end if
  add 1 to i
end repeat


Regards,
Dave Tremmel


On 4/29/02 10:01 AM, "shop" <[EMAIL PROTECTED]> wrote:

I have a number of repeat loops in my software which I would love to speed up using the "repeat for each" technique but I don't want to start with the first line.  Instead, I want to start based on which line the user selects in a fld.  A typical example of what I'm currently doing follows:

 put the SelectedText of fld "Scene List" into CurScene
  put lineoffset(CurScene&return,SceneFile) into q
  repeat with q2 = q+1 to the number of lines in SceneFile
        do stuff
  end repeat

Any suggestions?

Rich Mooney
Payne Sparkman Mfg.
[EMAIL PROTECTED]




--
David Tremmel
RooTracker Developer

Duke University
Phytotron Bldg.                                 Phone:  (919) 660-7415
Box 90340                                       FAX:    (919) 660-7425
Durham, NC  27708-0340                          E-mail: [EMAIL PROTECTED]

Reply via email to