Strange $loop and $next values

Post Reply
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

Strange $loop and $next values

Post by michel.weber »

I have written a small vortex script that does a loop.
When i print $loop and $next everything is like expected (i.e. they are incremented and $next=$loop+1)
I added a <rex> to the loop.
When i print $ loop and $next after the <rex> they are both either 0 or one and $loop=$next.

What am i missing?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Strange $loop and $next values

Post by John »

<rex> is a looping operator with options, so you can say for example:

<rex ROW "\alpha+" $Var>
Word[$loop] is $ret
</rex>

You can save the values of $loop and $next to other variables at the top of the loop if you need to use them later.
John Turnbull
Thunderstone Software
Post Reply