<HTML>
<HEAD>
<TITLE>Re: using "repeat for each" when you don't want to start with the first line</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana">Off the top of my head, here’s one approach -<BR>
<BR>
put 1 into i<BR>
repeat for each line L in fld “Scene List”<BR>
if i >= the selectedLine of fld “Scene List” then<BR>
<BR>
do stuff (note that the current line is in the variable L)<BR>
<BR>
end if<BR>
add 1 to i<BR>
end repeat<BR>
<BR>
<BR>
Regards,<BR>
Dave Tremmel<BR>
<BR>
<BR>
On 4/29/02 10:01 AM, "shop" <shop@paynesparkman.com> wrote:<BR>
<BR>
</FONT><BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Arial">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:<BR>
</FONT></FONT><FONT FACE="Verdana"> <BR>
</FONT><FONT SIZE="2"><FONT FACE="Arial"> put the SelectedText of fld "Scene List" into CurScene<BR>
put lineoffset(CurScene&return,SceneFile) into q<BR>
repeat with q2 = q+1 to the number of lines in SceneFile<BR>
do stuff<BR>
end repeat<BR>
</FONT></FONT><FONT FACE="Verdana"> <BR>
</FONT><FONT SIZE="2"><FONT FACE="Arial">Any suggestions?<BR>
</FONT></FONT><FONT FACE="Verdana"> <BR>
</FONT><FONT SIZE="2"><FONT FACE="Arial">Rich Mooney<BR>
Payne Sparkman Mfg.<BR>
shop@paynesparkman.com<BR>
</FONT></FONT><FONT FACE="Verdana"><BR>
</FONT></BLOCKQUOTE><FONT FACE="Verdana"><BR>
<BR>
<BR>
--<BR>
David Tremmel<BR>
RooTracker Developer<BR>
<BR>
Duke University<BR>
Phytotron Bldg. Phone: (919) 660-7415<BR>
Box 90340 FAX: (919) 660-7425<BR>
Durham, NC 27708-0340 E-mail: rootracker@duke.edu<BR>
</FONT>
</BODY>
</HTML>