The $next variable is set every iteration and at the end of LOOP, SQL, TIMPORT and fetch loops. Inside the loop, it is equivalent to the iteration count, starting from 1. At the end of the loop, it is the value to use for SKIP in a new LOOP or SQL to continue iterating at the next value. For LOOP statements, $next has the same value as $loop (plus 1 inside), but for SQL $next is equal to $loop plus the initial SKIP value (plus 1 inside).

Copyright © Thunderstone Software     Last updated: Sep 25 2019
Copyright © 2020 Thunderstone Software LLC. All rights reserved.