using "repeat for each" when you don't want to start with the first line

David Tremmel david.tremmel at duke.edu
Mon Apr 29 10:23:01 EDT 2002


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" <shop at paynesparkman.com> 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.
> shop at paynesparkman.com
> 



--
David Tremmel
RooTracker Developer

Duke University
Phytotron Bldg.                                 Phone:  (919) 660-7415
Box 90340                                       FAX:    (919) 660-7425
Durham, NC  27708-0340                          E-mail: rootracker at duke.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20020429/b802d220/attachment.htm


More information about the metacard mailing list