CONTINUE

Purpose:

Terminates the execution of any remaining statements in the body of a FOR or WHILE loop. Control is transferred to the end of the body and the next loop test expression is evaluated.

Syntax:

CONTINUE

Example:

CountIt(n)
{
    local a, j;
    
    a = 0;
    
    for (j = 1; j < n; j++)
    {
        if (a > 10) continue;
 
        a += j;
    }
    
    return(a);
}

 

In the SPL function CountIt, if a is greater than 10, then nothing more will be added to it. The CONTINUE statement will break out of the FOR loop, and, after j == n, will return the value.

Remarks:

CONTINUE is for use in SPL files.

See Also:

BREAK

FOR

IF

LOOP

RETURN

SPL: Series Processing Language

WHILE