COBOL

From Illogicopedia
Jump to navigation Jump to search
AA-INTRODUCTION SECTION.
       AA-01.
      *     A HORRIBLY VERBOSE PROGRAMMING LANGUAGE
      *     THAT PROBABLY NEVER SHOULD HAVE BEEN 
      *     INVENTED.  THERE ARE MILLIONS OF
      *     LINES OF THIS GARBAGE STILL IN USE.
      *
      *     THE ONLY GOOD THING ABOUT COBOL WAS THAT
      *     IT STOPPED BAD PROGRAMMERS BEING REALLY
      *     AWFUL PROGRAMMERS.
      *   
      *     HOWEVER, COBOL CAN BE FOUND AT THE MAINFRAME
      *     OF YOUR FAVORITE BANK. THE 60'S STRIKE AGAIN.
      *
      *     NOW, ADD 1 TO COBOL GIVING COBOL, PLEASE, .
      *     DEAR COMPUTER, AND RETURN THE RESULT (S0C7)
      *     AT MORNING.
      *
      *     THERE IS NO CABAL.

           PERFORM IMMORAL-ACTS UNTIL POLICE ARRIVE.
           DIVIDE CAKE INTO MANY-PIECES YIELDING BIRTHDAY-PARTY.
           EVALUATE TRUE
           WHEN CAKE NOT = 1 OR 3 OR 5 OR 7 OR (MOON-PHASE NUMERIC)
               MOVE CORRESPONDING MANY-PIECES TO MANY-MOUTHS
           WHEN OTHER
               EXEC CICS LINK PROGRAM  ('TOAST')
                              COMMAREA (RUM-BOTTLE)
                              LENGTH   (ONE-GLASS)
                              END-EXEC.
     * EAT THAT, MISERABLE MAINTENANCE PROGRAMMER!!!
           IF DRUNK-FLAG
              INSPECT STOMACH REPLACING ALL LOW-VALUES BY ZEROES
               IF STOMACH > ZERO
                ERROR IN LINE 10, CHAR 4: CAKE SERVING RATIO IS NULL
                NEXT SENTENCE
            ELSE
                 GOTO A99.
           GOTO AA-Z23X.

      AA-Z23X.
          PERFORM AA-01 THRU AA-Z23X UNTIL WORLD-SPIN-SPEED > 5
          GOBACK.

      AA-99.
          MOVE RANDOM TO RETURN CODE
          STOP RUN.
     *END OF PROGRAM (REST IN PIECE, PLEASE)
      END PROGRAM COBOL.