How to create comments using only * in COBOL?

43 Views Asked by At

I've just started reading about COBOL. In many articles they say that comment can be created using only *, I mean without using *>.

I tried to use it in column 1 and column 7 but I got syntax error in these online compilers: 1, 2

in column 1

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
* Comment       
DISPLAY 'Hello, world'.
STOP RUN.

in column 7

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
      * Comment       
DISPLAY 'Hello, world'.
STOP RUN.

ChatGPT also says that comment can be created using only *. Could anyone say what I am doing wrong?

0

There are 0 best solutions below