Previous Page Next Page Contents

next -- skip a step in a loop

Introduction

next interrupts the current step in for, repeat, and while loops. Execution proceeds with the next step of the loop.

Call(s)


next _next()

Related Functions

break, case, for, quit, repeat, return, while

Details

Example 1

In the following for loop, any step with even i is skipped:

>> for i from 1 to 5 do
     if testtype(i, Type::Even) then next end_if;
     print(i)
   end_for:
                                     1
      
                                     3
      
                                     5

In the following repeat loop, all steps with odd i are skipped:

>> i := 0:
   repeat
     i := i + 1;
     if testtype(i, Type::Odd) then next end_if;
     print(i)
   until i >= 5 end_repeat:
                                     2
      
                                     4
>> delete i:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000