Skip to main content

View Diary: Anti-modernity GOP wants to catch up to Democrats on technology (235 comments)

Comment Preferences

    •  It's short for Formula Translator... (2+ / 0-)
      Recommended by:
      raboof, Eyesbright

      ...one of the oldest programming languages.  It was developed at IBM in the 1950's:

      The original fortran was very primitive and rigid in its implementation.  Each line of code had to be lined up perfectly within certain columns for it to work... a relic of the punchcard era:

      Comments must begin with a * or C or ! in column 1
      Statement labels must occur in columns 1-5
      Continuation lines must have a non-blank character in column 6
      Statements must start in column 7
      The line-length may be limited to 72 characters (derived From the 80-byte width of a punch-card, with last 8 characters reserved for (optional) sequence numbers)
      An example:
      C AREA OF A TRIANGLE - HERON'S FORMULA
      C INPUT - CARD READER UNIT 5, INTEGER INPUT
      C OUTPUT - LINE PRINTER UNIT 6, REAL OUTPUT
      C INPUT ERROR DISPAY ERROR OUTPUT CODE 1 IN JOB CONTROL LISTING
            INTEGER A,B,C
            READ(5,501) A,B,C
        501 FORMAT(3I5)
            IF(A.EQ.0 .OR. B.EQ.0 .OR. C.EQ.0) STOP 1
            S = (A + B + C) / 2.0
            AREA = SQRT( S * (S - A) * (S - B) * (S - C))
            WRITE(6,601) A,B,C,AREA
        601 FORMAT(4H A= ,I5,5H  B= ,I5,5H  C= ,I5,8H  AREA= ,F10.2,12HSQUARE UNITS)
            STOP
            END
      See how easy to use that is?  Well, it's a lot better than assembly.  As time went on, changes were made to the specification.  Column restrictions were removed and there was increased support for procedures and even objects.

      Despite it's age, FORTRAN is still being used extensively in all types of engineering, astronomy, and other mathematical sciences.  Why?  It's well designed for mathematical problems, and it's extremely efficient when it's compiled, so it runs very very fast.  While COBOL may be FINALLY going the way of the dodo, FORTRAN is here to stay for quite awhile.

      GODSPEED TO THE WISCONSIN FOURTEEN!

      by LordMike on Mon Mar 04, 2013 at 11:59:15 AM PST

      [ Parent ]

      •  Actually that's pretty straightforward code (2+ / 0-)
        Recommended by:
        LordMike, Eyesbright

        The only "funny" part is in the output FORMAT statements, and we still get that kind of thing in "modern" languages. (e.g. the printf() functions in C. I suspect even Dennis Ritchie had to use the manual to properly format his output with those.)

        The thing about quotes on the internet is you cannot confirm their validity. ~Abraham Lincoln

        by raboof on Mon Mar 04, 2013 at 12:25:47 PM PST

        [ Parent ]

        •  Oh it's fine for an expeienced programmer... (1+ / 0-)
          Recommended by:
          Eyesbright

          ...but I'm sure it looks like gibberish to the uninitiated.  As awful as COBOL was (and it's probably the worst programming language, ever), it certainly was self-documenting.  Amazing that it was so wordy, though.  People had to type those wordy statements all onto punch cards, and a lot of them!  There was no such thing as a short cobol program--although, you could probably reuse a lot of cards from the non-program sections:


          /COBUCLG  JOB CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1)
          //HELOWRLD EXEC COBUCLG,PARM.COB='MAP,LIST,LET'
          //COB.SYSIN DD *
            001  IDENTIFICATION DIVISION.
            002  PROGRAM-ID.  'HELLO'.
            003  ENVIRONMENT DIVISION.
            004  CONFIGURATION SECTION.
            005  SOURCE-COMPUTER.  IBM-360.
            006  OBJECT-COMPUTER.  IBM-360.
            0065 SPECIAL-NAMES.
            0066     CONSOLE IS CNSL.
            007  DATA DIVISION.
            008  WORKING-STORAGE SECTION.
            009  77  HELLO-CONST   PIC X(12) VALUE 'HELLO, WORLD'.
            075  PROCEDURE DIVISION.
            090  000-DISPLAY.
            100      DISPLAY HELLO-CONST UPON CNSL.
            110      STOP RUN.
          //LKED.SYSLIB DD DSNAME=SYS1.COBLIB,DISP=SHR
          /
                     DD DSNAME=SYS1.LINKLIB,DISP=SHR
          /GO.SYSPRINT DD SYSOUT=A
          /
          That's what it took just to do Hello World.  No wonder no one under 50 still uses this archaic PITA language.

          GODSPEED TO THE WISCONSIN FOURTEEN!

          by LordMike on Mon Mar 04, 2013 at 01:47:47 PM PST

          [ Parent ]

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site