ILE COBOL Language Reference
If the condition tested is true,
one of the following actions takes place:
- Statement-1, if specified, is executed. If statement-1 contains a
procedure branching statement, control is transferred, according to the rules
for that statement. If statement-1 does not contain a
procedure-branching statement, the ELSE phrase, if specified, is ignored, and
control passes to the next executable statement after the corresponding
(implicit or explicit) END-IF or separator period.
- NEXT SENTENCE, if specified, is executed; that is, the ELSE phrase,
if specified, is ignored, and control passes to the statement following the
closest separator period.
If the condition tested is false, one of the following actions
takes place:
- ELSE statement-2, if specified, is executed. If statement-2
contains a procedure-branching statement, control is transferred, according to
the rules for that statement. If statement-2 does not contain a
procedure-branching statement, control is passed to the next executable
statement after the corresponding END-IF or separator period.
- ELSE NEXT SENTENCE, if specified, is executed and control passes to the
statement following the closest separator period.
- If ELSE NEXT SENTENCE is omitted, control passes to the next executable
statement after the corresponding END-IF or separator period.
- Note:
- When ELSE or ELSE NEXT SENTENCE are omitted, all statements following the
condition and preceding the corresponding END-IF or the separator period for
the sentence are considered to be part of statement-1.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.