COBOL/400 Language Help


IF Statement

Description
The IF statement evaluates a condition and provides for alternative actions in the object program, depending on the evaluation.
->->--IF condition--*-------*------------------------------------------->
                  *-THEN--*
 
         *------------*
         V            +
 ->--*--*--statement-1-*--*-*----------------------------*--------*----><-
    +  *--NEXT SENTENCE--* +       *------------*       +        +
    +                      +       V            +       +        +
    +                      *-ELSE-*-statement-2-*--*----*        +
    +                             *-NEXT SENTENCE--*             +
    +                                                            +
    +    *------------*            *------------*                +
    +    V            +            V            +                +
    *-----statement-1-*----*-ELSE---statement-2-*---*--------*---*
                           +                        *-END-IF-*   +
                           +                                     +
                           *-END-IF------------------------------*
 


[ Top of Page | Previous Page | Next Page | Table of Contents ]