Ü  DOU (Do Until)

§  The DoU-EndDo loop continues until the loop condition remains false.

§  The Do until loop is guaranteed to be executed at least once.  This is because the looping condition is checked at the end of iteration.

 

Factor 1

Op-code

Factor 2

Result Field

Resulting Indicators

       HI                            LO                      EQ

DOU

Loop expression

 

 

 

 

 

Example


DCount          S              2P 0 Inz
**
C                   DoU       Count = 6
C     Count       Dsply
C                   Eval      Count = Count + 1
C                   EndDo
**
C                   Return

 

                     

 

OUTPUT

 

DSPLY   0

DSPLY   1

DSPLY   2

DSPLY   3

DSPLY   4

DSPLY   5

 











User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy