(Thanks to Clive Page for the information on MIL-STD influence,
  and to Craig Burley for the important corrections)

 In the general programming rules section, it was emphasized how 
 important it is to adhere to the standard of FORTRAN, and avoid 
 fancy but unportable language extensions.

 Some tempting extensions NOT in the FORTRAN 77 standard are:

    Using lowercase letters
    ENDDO construct 
    DO WHILE ... ENDDO construct 
    IMPLICIT NONE statement 
    The 'size suffixes' (or star notation): REAL*4, REAL*8, INTEGER*4, ...
    Identifiers longer than 6 characters
    Allowing more than 19 continuation lines 
    Allowing code up to column 131
    Non-advancing format edit-descriptor ('$') 
    CARRIAGECONTROL keyword in the 'OPEN' statement
    Indexed files
    Automatic arrays

 The list is ordered (more or less) in increasing order of 'badness', 
 the first items are 'almost standard'. Most of this 'wish list' was
 adopted by Fortran 90.

 MIL-STD and its influence
 A major source of FORTRAN extensions was the US MIL-STD-1753 army
 standard that came out just after FORTRAN 77, and added some more 
 language constructs like: 

    END DO          MIL-STD 1753 did _not_ add END DO as we are 
                    generally familiar with -- it added END DO as, 
                    basically, a synonym for CONTINUE, which means 
                    it would still have to be a final (labeled)
                    statement of a _labeled_ iterative DO that 'closes' 
                    the loop to meet that standard's requirements.  

                    Of course, many other dialects added the 
                    superior nonlabeled END DO as an extension as well, 
                    allowing a non-labeled iterative DO to have a single, 
                    unique terminating END DO statement, which is much 
                    more in the spirit of structured programming.

    DO WHILE ...    Loop is tested in the beginning

    IMPLICIT NONE   Turns off implicit data typing

    INCLUDE         Useful to keep COMMON declarations identical

    Miscs:          Octal and hex constants in DATA statements

                    Bitwise intrinsic functions: 

                        Logical operations:  IOR, IAND, NOT, IEOR,
                        Shift operations:    ISHFT, ISHFTC, 
                        Reading & Moving:    IBITS, MVBITS, 
                        Testing & setting:   BTEST, IBSET, IBCLR, 

 Since MIL-STD compliance was mandatory for FORTRAN systems sold 
 to the US Government, it quickly became a world-wide standard.

 The new wonderful Fortran 90 accepted these extensions, and made 
 some major changes that transformed FORTRAN into a powerful and 
 modern language.

Return to contents page