feat: add COBOL statement benchmark plan and 34 P0 sample programs
- 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
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
* ==== TYPE: ST-ADD-ROUNDED ====
|
||||
* FEATURE: ADD ROUNDED
|
||||
* STATEMENT: ADD ROUNDED
|
||||
* BRANCHES: 2, DECISIONS: 1
|
||||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. ADDRND.
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 WS-VAL1 PIC 9(3)V99 VALUE 100.50.
|
||||
01 WS-VAL2 PIC 9(3)V99 VALUE 200.75.
|
||||
01 WS-RESULT PIC 9(3)V99 VALUE 0.
|
||||
01 WS-CHECK PIC 9(3)V99 VALUE 301.25.
|
||||
PROCEDURE DIVISION.
|
||||
MAIN.
|
||||
ADD WS-VAL1 TO WS-VAL2 GIVING WS-RESULT ROUNDED.
|
||||
IF WS-RESULT = WS-CHECK
|
||||
DISPLAY 'OK: 100.50+200.75=301.25'
|
||||
ELSE
|
||||
DISPLAY 'ERROR: WRONG SUM'.
|
||||
STOP RUN.
|
||||
Reference in New Issue
Block a user