<HTML>
<HEAD>
<TITLE>Re: using "repeat for each" when you don't want to start with the first line</TITLE>
</HEAD>
<BODY>
on 4/29/02 7:01 AM, shop at shop@paynesparkman.com wrote:<BR>
<BR>
<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> <BR>
<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> <BR>
<FONT SIZE="2"><FONT FACE="Arial">Any suggestions?<BR>
</FONT></FONT> <BR>
<FONT SIZE="2"><FONT FACE="Arial">Rich Mooney<BR>
Payne Sparkman Mfg.<BR>
shop@paynesparkman.com<BR>
</FONT></FONT><BR>
</BLOCKQUOTE><BR>
As a side note, should you be setting the WholeMatches to true before using the lineOffset function? I got caught on this one. If I don't set the WholeMatches to true lineOffset will find matches within lines.<BR>
<BR>
Ray Horsley<BR>
Developer, LinkIt! Software
</BODY>
</HTML>