News for hackers. Stuff that matters.
Re:The Beauty of COBOL (2018) by AdieuToLogic on Saturday October 19, 2019 @12:23AM (#21296745)
> Oh man, I always wanted to learn more about COBOL. People like to crap on the language, but this article makes it seem like it's not that bad, actually.

  IDENTIFICATION DIVISION.
  PROGRAM-ID. WELCOME-TO-COBOL.  
  
  DATA DIVISION.
     WORKING-STORAGE SECTION.
     01 MAKES-PROGRAMMING-FUN PIC 9(9).
     01 ALL-VARIABLES-ARE-GLOBAL PIC 9(9).
  
  PROCEDURE DIVISION.
     A000-FIRST-PARA.
     MOVE 0 TO MAKES-PROGRAMMING-FUN.
     MOVE 1 TO ALL-VARIABLES-ARE-GLOBAL.
  
     IF ALL-VARIABLES-ARE-GLOBAL = MAKES-PROGRAMMING-FUN THEN
        DISPLAY '20 LINES OF CODE TO SAY ENJOY COBOL!'
     ELSE
        DISPLAY 'USE A BETTER LANGUAGE'
     END-IF.
  
  STOP RUN.

There are no comments on this comment yet.