> Hi, I�m new to MetaCard, just trying to set up a loop that searches
> through a field.
>
> Is there a way to set the increment of a repeat loop?
>
> The aim is to search every 3rd line of a field for a number. I thought
> of something like:
>
> put fld "schedule" into fldVar
> repeat with i = 1 to the number of lines of fldvar >step 3 ?<
>     repeat with j = 1 to the number of words of line i of fldVar
>         if word j of line i of fldvar is a number then put word j of
> line i of fldvar after hoursVar(i)
>     end repeat
> end repeat
>
> Thanks for any advice
>
> Sven
>
> --------------- MESSAGE metacard.v003.n076.7 ---------------
>
> From: "Kevin Miller" <[EMAIL PROTECTED]>
> Subject: Re: setting the increment of a repeat loop
> Date: Tue, 21 Sep 1999 13:31:54 +0100
> MIME-Version: 1.0
> Content-Type: text/plain; charset="ISO-8859-1"
> Content-Transfer-Encoding: 8bit
>
> On Tuesday, Sept 21 1999, Sven Schulzke wrote:
>
> > Hi, I�m new to MetaCard, just trying to set up a loop that searches
> > through a field.
> >
> > Is there a way to set the increment of a repeat loop?
> >
> > The aim is to search every 3rd line of a field for a number. I thought
> > of something like:
> >
> > put fld "schedule" into fldVar
> > repeat with i = 1 to the number of lines of fldvar >step 3 ?<
> >     repeat with j = 1 to the number of words of line i of fldVar
> >         if word j of line i of fldvar is a number then put word j of
> > line i of fldvar after hoursVar(i)
> >     end repeat
> > end repeat
> >
> >
> > Thanks for any advice
>
> Try the line:
>
> add 2 to i
>
> Right before the second "end repeat"
>
> Regards,
>
> Kevin
>
> > Sven
>
> Kevin Miller <[EMAIL PROTECTED]> <http://www.xworlds.com/>
> Cross Worlds Computing, MetaCard Distributors, Custom Development.
> Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.

Thanks for your quick and helpful reply, Kevin. The script now works very well.

Reply via email to