Fortran/Catalogs
< Fortran
Jump to navigation
Jump to search
The initial release of FORTRAN for the IBM 704 contained 32 statements, including:
DIMENSIONandEQUIVALENCEstatements- Assignment statements
- Three-way arithmetic
IFstatement. IFstatements for checking exceptions (ACCUMULATOR OVERFLOW,QUOTIENT OVERFLOW, andDIVIDE CHECK); andIFstatements for manipulating sense switches and sense lightsGOTO, computedGOTO,ASSIGN, and assignedGOTODOloops- Formatted I/O:
FORMAT,READ,READ INPUT TAPE,WRITE,WRITE OUTPUT TAPE,PRINT, andPUNCH - Unformatted I/O:
READ TAPE,READ DRUM,WRITE TAPE, andWRITE DRUM - Other I/O:
END FILE,REWIND, andBACKSPACE PAUSE,STOP, andCONTINUEFREQUENCYstatement (for providing optimization hints to the compiler)
FORTRAN 66 includes:
- Main program,
SUBROUTINE,FUNCTION, andBLOCK DATAprogram units INTEGER,REAL,DOUBLE PRECISION,COMPLEX, andLOGICALdata typesCOMMON,DIMENSION, andEQUIVALENCEstatementsDATAstatement for specifying initial values- Intrinsic and
EXTERNAL(e.g., library) functions - Assignment statement
GOTO, assignedGOTO, and computedGOTOstatements- Logical
IFand arithmetic (three-way)IFstatements DOloopsREAD,WRITE,BACKSPACE,REWIND, andENDFILEstatements for sequential I/OFORMATstatementCALL,RETURN,PAUSE, andSTOPstatements- Hollerith constants in
DATAandFORMATstatements, and as actual arguments to procedures - Identifiers of up to six characters in length
- Comment lines
FORTRAN 77 includes:
- Block
IFandEND IFstatements, with optionalELSEandELSE IFclauses. - DO loop extensions, including parameter expressions, negative increments, and zero trip counts
OPEN,CLOSE, andINQUIREstatements for improved I/O capability- Direct-access file I/O
IMPLICITstatementCHARACTERdata type, with vastly expanded facilities for processing of character-based dataPARAMETERstatement for specifying constantsSAVEstatement for persistent local variables- Generic names for intrinsic functions
- A set of intrinsics (
LGE, LGT, LLE, LLT) for lexical comparison of strings, based upon the ASCII collating sequence. DO WHILEandEND DOstatementsINCLUDEstatementIMPLICIT NONEvariant of theIMPLICITstatement- Bit manipulation intrinsic functions, based on similar functions included in Industrial Real-Time Fortran (ANSI/ISA S61.1 (1976))