COBOL never dies
-
COBOL requires crazy indentation rules
(Reference ☞ [Wikipedia] COBOL > Features > Code format)- Comments must start with
*
in column 7 - DIVISION, SECTION headers must start from column 8
- Do not exceed column 80
- Comments must start with
-
Compiled by cobc (GnuCOBOL) 3.1.2.0 in replit
-
Codes and Output
Codes : HelloWorld.cob
* Hello World in COBOL * 2023.09.04 IDENTIFICATION DIVISION. PROGRAM-ID. HelloWorld. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-HELLO-MESSAGE PIC X(13) VALUE 'Hello, World!'. PROCEDURE DIVISION. DISPLAY WS-HELLO-MESSAGE. STOP RUN.
Output
Hello, World!