3.3.2.5 Continue

Jump to the next iteration of a loop or for structure.

Syntax:

continue

Options:

None

Examples:

In the following for loop, continue skips the type statement when ii is less than zero.


for (ii = -10; ii <= 10; ii += 2) 
{
      if (ii < 0) {continue;};
      type "$(sqrt(ii))";
};

The next script adds a Real column to the first sheet of Test1 book. It tests each value in the Test1_B dataset and adds the values that are not null to the Test1_Real dataset.

page.xlcolname = 0; //Turn off Spreadsheet Cell Notation firstly
Test1!wks.addCol(Real);  //Add col name Real to end of Test1
get Test1_B -e EndIndex;  //EndIndex is # of last value in Test1
for (ii = 1, jj = 1; ii < EndIndex; ii++)
{
      if (Test1_B[ii] == 0/0)  //If ii index number value is null 
      { 
            continue;   //Skip the rest of this iteration of the loop 
      };
      Test1_Real[jj] = Test1_B[ii];
      jj++;   //Iterate Real index # after value has been added
};

For the Spreadsheet Cell Notation in the workbook, please see FAQ-849 for more information.

See Also:

Break (command)

If (command), Exit (command), For (command), Loop (command), Repeat (command), Switch (command), Document -e (command)