Progress
Language Reference


NEXT Statement

Interfaces
OS
SpeedScript
All
All
Yes

Goes directly to the END of an iterating block and starts the next iteration of the block.

SYNTAX

NEXT [ label ] 

label

The name of the block for which you want to start the next iteration. If you do not name a block, Progress starts the next iteration of the innermost iterating block that contains the NEXT statement.

EXAMPLE

The FOR EACH block in this procedure reads a single customer record on each iteration of the block. If the sales-rep field of a customer record does not match the sales-rep value supplied to the PROMPT-FOR statement, the NEXT statement causes Progress to do the next iteration of the FOR EACH block, bypassing the DISPLAY statement.

r-next.p
PROMPT-FOR customer.sales-rep LABEL "Enter salesman initials"
    WITH SIDE-LABELS CENTERED.
FOR EACH customer:
    IF sales-rep <> INPUT sales-rep
    THEN NEXT.
    DISPLAY cust-num name city state WITH CENTERED USE-TEXT.
END. 

SEE ALSO

LEAVE Statement


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095