PreviousNextIndex

NEXT statement

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

Syntax

NEXT [ label ] 

label
Example

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

r-next.p
PROMPT-FOR Customer.SalesRep LABEL "Enter salesman initials" 
  WITH SIDE-LABELS CENTERED. 
FOR EACH Customer: 
  IF Customer.SalesRep <> INPUT Customer.SalesRep THEN NEXT. 
  DISPLAY Customer.CustNum Customer.Name Customer.City Customer.State  
    WITH CENTERED USE-TEXT. 
END. 

See also

LEAVE statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex