Я медленно изучаю COBOL и решаю некоторые задачи, чтобы выздороветь, но у меня возникла странная проблема, которую я не могу отследить, и я хотел посмотреть, сможет ли кто-нибудь еще помочь
Я дважды и трижды проверил, что должно быть в области A и B, где в их правильных числах col
IDENTIFICATION DIVISION.
PROGRAM-ID. CIRCLES.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER.
OBJECT-COMPUTER.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 WS-CONSTANTS.
05 WS-PI PIC 9V99999 VALUE 3.14159.
01 WS-CIRCLE.
05 WS-AREA PIC 999V99 VALUE ZEROES.
05 WS-RADIUS PIC 9999V99 VALUE ZEROES.
05 WS-CIRCUMFERENCE PIC 99999V99 VALUE ZEROES.
01 WS-DISPLAY-VALUES.
05 WS-DISPLAY-AREA PIC ZZ99.99.
05 WS-DISPLAY-CIRCUMFERENCE PIC ZZ99.99.
PROCEDURE DIVISION.
0100-PROCESS-RECORDS.
DISPLAY "Please enter radius of circle: ".
ACCEPT WS-RADIUS.
COMPUTE WS-CIRCUMFRENCE = 2 * WS-PI * WS-RADIUS.
MOVE WS-CIRCUMFRENCE TO WS-DISPLAY-CIRCUMFRENCE.
DISPLAY "Circle Circumfrence is: ", WS-DISPLAY-CIRCUMFRENCE.
COMPUTE WS-RADIUS = WS-PI * WS-RADIUS * WS-RADIUS.
MOVE WS-AREA TO WS-DISPLAY-AREA.
DISPLAY "Circle area is: ", WS-DISPLAY-AREA
STOP RUN
сообщений компилятора:
Circles.cbl:28: error: PROCEDURE DIVISION header missing
Circles.cbl:28: error: syntax error, unexpected level-number
Circles.cbl:29: error: unknown statement '05'
Circles.cbl:30: error: unknown statement '05'
Circles.cbl:34: error: syntax error, unexpected PROCEDURE
Circles.cbl: in paragraph '0100-PROCESS-RECORDS':
Circles.cbl:40: error: 'WS-RADIUS' is not defined
Circles.cbl:41: error: 'WS-CIRCUMFRENCE' is not defined
Circles.cbl:41: error: 'WS-PI' is not defined
Circles.cbl:41: error: 'WS-RADIUS' is not defined
Circles.cbl:42: error: 'WS-CIRCUMFRENCE' is not defined
Circles.cbl:42: error: 'WS-DISPLAY-CIRCUMFRENCE' is not defined
Circles.cbl:43: error: 'WS-DISPLAY-CIRCUM' is not defined
Circles.cbl:44: error: 'WS-RADIUS' is not defined
Circles.cbl:44: error: 'WS-PI' is not defined
Circles.cbl:44: error: 'WS-RADIUS' is not defined
Circles.cbl:44: error: 'WS-RADIUS' is not defined
Circles.cbl:45: error: 'WS-AREA' is not defined
Circles.cbl:45: error: 'WS-DISPLAY-AREA' is not defined
Circles.cbl:46: error: 'WS-DISPLAY-AREA' is not defined