Recent from talks
Fortran 95 language features
Knowledge base stats:
Talk channels stats:
Members stats:
Fortran 95 language features
This is an overview of Fortran 95 language features which is based upon the standards document which has been replaced by a newer version. Included are the additional features of TR-15581:Enhanced Data Type Facilities, which have been universally implemented. Old features that have been superseded by new ones are not described – few of those historic features are used in modern programs although most have been retained in the language to maintain backward compatibility. The additional features of subsequent standards, up to Fortran 2023, are described in the Fortran 2023 standard document, ISO/IEC 1539-1:2023. Some of its new features are still being implemented in compilers. Details can also be found in a range of textbooks, for instance and see the list at Fortran Resources. Sources for the description in the sections below can be found in the standards documents, textbooks as well as the Bibliography.
Fortran is case-insensitive. The convention of writing Fortran keywords in upper case and all other names in lower case is adopted in this article; except, by way of contrast, in the input/output descriptions (Data transfer and Operations on external files).
The basic component of the Fortran language is its character set. Its members are
Tokens that have a syntactic meaning to the compiler are built from those components. There are six classes of tokens:
From the tokens, statements are built. These can be coded using the new free source form which does not require positioning in a rigid column structure:
Note the trailing comments and the trailing continuation mark. There may be 39 continuation lines, and 132 characters per line. Blanks are significant. Where a token or character constant is split across two lines:
a leading & on the continued line is also required.
Fortran has five intrinsic data types: INTEGER, REAL, COMPLEX, LOGICAL and CHARACTER. Each of those types can be additionally characterized by a kind. Kind, basically, defines internal representation of the type: for the three numeric types, it defines the precision and range, and for the other two, the specifics of storage representation. Thus, it is an abstract concept which models the limits of data types' representation; it is expressed as a member of a set of whole numbers (e.g. it may be {1, 2, 4, 8} for integers, denoting bytes of storage), but those values are not specified by the Standard and not portable. For every type, there is a default kind, which is used if no kind is explicitly specified. For each intrinsic type, there is a corresponding form of literal constant. The numeric types INTEGER and REAL can only be signed (there is no concept of sign for type COMPLEX).
Hub AI
Fortran 95 language features AI simulator
(@Fortran 95 language features_simulator)
Fortran 95 language features
This is an overview of Fortran 95 language features which is based upon the standards document which has been replaced by a newer version. Included are the additional features of TR-15581:Enhanced Data Type Facilities, which have been universally implemented. Old features that have been superseded by new ones are not described – few of those historic features are used in modern programs although most have been retained in the language to maintain backward compatibility. The additional features of subsequent standards, up to Fortran 2023, are described in the Fortran 2023 standard document, ISO/IEC 1539-1:2023. Some of its new features are still being implemented in compilers. Details can also be found in a range of textbooks, for instance and see the list at Fortran Resources. Sources for the description in the sections below can be found in the standards documents, textbooks as well as the Bibliography.
Fortran is case-insensitive. The convention of writing Fortran keywords in upper case and all other names in lower case is adopted in this article; except, by way of contrast, in the input/output descriptions (Data transfer and Operations on external files).
The basic component of the Fortran language is its character set. Its members are
Tokens that have a syntactic meaning to the compiler are built from those components. There are six classes of tokens:
From the tokens, statements are built. These can be coded using the new free source form which does not require positioning in a rigid column structure:
Note the trailing comments and the trailing continuation mark. There may be 39 continuation lines, and 132 characters per line. Blanks are significant. Where a token or character constant is split across two lines:
a leading & on the continued line is also required.
Fortran has five intrinsic data types: INTEGER, REAL, COMPLEX, LOGICAL and CHARACTER. Each of those types can be additionally characterized by a kind. Kind, basically, defines internal representation of the type: for the three numeric types, it defines the precision and range, and for the other two, the specifics of storage representation. Thus, it is an abstract concept which models the limits of data types' representation; it is expressed as a member of a set of whole numbers (e.g. it may be {1, 2, 4, 8} for integers, denoting bytes of storage), but those values are not specified by the Standard and not portable. For every type, there is a default kind, which is used if no kind is explicitly specified. For each intrinsic type, there is a corresponding form of literal constant. The numeric types INTEGER and REAL can only be signed (there is no concept of sign for type COMPLEX).