8c1f9114f6
- docs/cobol-statement-benchmark-plan.md — full coverage matrix and gap analysis - 34 P0 COBOL samples: arithmetic(9), move(5), file(6), control(6), inspect(3), search(2), perform(3) - test-data/validate_statements.py — automatic validation script - Validation: 34/34 samples pass preprocess + extract_structure
25 lines
727 B
COBOL
25 lines
727 B
COBOL
* ==== TYPE: ST-IF-DEEP ====
|
|
* FEATURE: IF nested 3+ levels deep
|
|
* STATEMENT: IF (nested)
|
|
* BRANCHES: 6, DECISIONS: 3
|
|
IDENTIFICATION DIVISION.
|
|
PROGRAM-ID. IFDEEP.
|
|
DATA DIVISION.
|
|
WORKING-STORAGE SECTION.
|
|
01 WS-X PIC 9(1) VALUE 1.
|
|
01 WS-Y PIC 9(1) VALUE 2.
|
|
01 WS-Z PIC 9(1) VALUE 3.
|
|
PROCEDURE DIVISION.
|
|
MAIN.
|
|
IF WS-X = 1
|
|
IF WS-Y = 2
|
|
IF WS-Z = 3
|
|
DISPLAY 'OK: NESTED'
|
|
ELSE
|
|
DISPLAY 'ERR: Z'
|
|
ELSE
|
|
DISPLAY 'ERR: Y'
|
|
ELSE
|
|
DISPLAY 'ERR: X'.
|
|
STOP RUN.
|