Programming languages — Fortran — Part 1: Base language
Introduction: This document comprises the specification of the base Fortran language, informally known as Fortran 2023. With the limitations noted in 4.3.3, the syntax and semantics of Fortran 2018 are contained entirely within Fortran 2023. Therefore, any standard-conforming Fortran 2018 program not affected by such limitations is a standard-conforming Fortran 2023 program. New features of Fortran 2023 can be compatibly incorporated into such Fortran 2018 programs, with any exceptions indicated in the text of this document. Fortran 2023 contains several extensions to Fortran 2018; these are listed below. • Source form: The maximum length of a line in free form source has been increased. The maximum length of a statement has been increased. The limit on the number of continuation lines has been removed. • Data declaration: A data object with a coarray component can be an array or allocatable. BIND(C) ENUM are now referred to as interoperable enumerations, and noninteroperable enumeration types are available. An interoperable enumeration can be given a type name. TYPEOF and CLASSOF type specifiers can be used to declare one or more entities to have the same type and type parameters as another entity. A PUBLIC namelist group can have a PRIVATE namelist group object. The DIMENSION attribute can be declared with a syntax that does not depend on the rank (8.5.8, 8.5.17). • Data usage and computation: Binary, octal, and hexadecimal literal constants can be used in additional contexts. A deferred
Scope: This document specifies the form and establishes the interpretation of programs expressed in the base Fortran language. The purpose of this document is to promote portability, reliability, maintainability, and efficient execution of Fortran programs for use on a variety of computing systems. This document specifies • the forms that a program written in the Fortran language can take, • the rules for interpreting the meaning of a program and its data, • the form of the input data to be processed by such a program, and • the form of the output data resulting from the use of such a program. Except where stated otherwise, requirements and prohibitions specified by this document apply to programs rather than processors. This document does not specify • the mechanism by which programs are transformed for use on computing systems, • the operations required for setup and control of the use of programs on computing systems, • the method of transcription of programs or their input or output data to or from a storage medium, • the program and processor behavior when this document fails to establish an interpretation except for the processor detection and reporting requirements in items (2) to (10) of 4.2, • the maximum number of images, or the size or complexity of a program and its data that will exceed the capacity of any particular computing system or the capability of a particular processor, • the mechanism for determining the number of images of a program, • the physical properties of an image or the relationship between images and the computational elements of a computing system, • the physical properties of the representation of quantities and the method of rounding, approximating, or computing numeric values on a particular processor, except by reference to ISO/IEC 60559:2020 under conditions specified in Clause 17, • the physical properties of input/output records, files, and units, or • the physical properties and implementation of storage. © ISO/IEC 2023 – All rights reserved ISO/IEC 1539-1:2023 (E)
Contents: