Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 2.04 KB

README.md

File metadata and controls

60 lines (36 loc) · 2.04 KB

COBOLOGO.PNG

Learning COBOL (programming language)

This section will go over my knowledge of the COBOL programming language. I am not very experienced with it, and likely won't dedicate too much time to it, since it is obsolete, and only used by dinosaur mainframe computers in businesses and governments who refuse to update from an 8 bit system while the rest of the world uses (rarely:32 bit) 64 bit and 128 bit systems. Enough bashing of the language with jargon terms, so far I actually like writing in it for some reason. It isn't as productive as C or Python though, so I prefer to stick with a newer, modern language.

Printing out to the screen in COBOL

In COBOL, to print to the screen you use the DISPLAY keyword like so:

DISPLAY "Sample text".

Comments in COBOL

COBOL comments are written like so:

*> COBOL only supports single line comments

Hello World in COBOL

Out of this example, I can only memorize the DISPLAY keyword. Here is the standard Hello World program in COBOL

       IDENTIFICATION DIVISION.
       PROGRAM-ID. hello-world.
       PROCEDURE DIVISION.
           DISPLAY "Hello, world!"
           .

End of line

In COBOL, a . must be placed at the end of every line. It is the languages equivalent to a semicolon. It is done like so:

DISPLAY "EOL".

Other knowledge of the COBOL programming language

  1. COBOL stands for COmmon Business Oriented Language

  2. COBOL uses the .cob .cbl and .cpy file extension, and according to Notepad++ it also uses the .cdc file format.

  3. The Jargon file refers to COBOL as "a language for dinosaur computers"

  4. COBOL is considered archaic by its own developers since the 1970s (specifically after the release of the C programming language) but it is still used by too many industries (over 5 billion lines of code written annually, over 200 billion lines of COBOL in total)

  5. COBOL is NOT a semicolon and curly bracket language

  6. No other knowledge of the COBOL programming language.