ISO/IEC 1539-1:2018
(Main)Information technology - Programming languages - Fortran - Part 1: Base language
Information technology - Programming languages - Fortran - Part 1: Base language
1. 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. 2. 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. 3. Except where stated otherwise, requirements and prohibitions specified by this document apply to programs rather than processors. 4. 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/IEEE 60559:2011 under conditions specified in Clause 17, - the physical properties of input/output records, files, and units, or - the physical properties and implementation of storage.
Technologies de l'information — Langages de programmation — Fortran — Partie 1: Langage de base
General Information
Relations
Frequently Asked Questions
ISO/IEC 1539-1:2018 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology - Programming languages - Fortran - Part 1: Base language". This standard covers: 1. 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. 2. 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. 3. Except where stated otherwise, requirements and prohibitions specified by this document apply to programs rather than processors. 4. 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/IEEE 60559:2011 under conditions specified in Clause 17, - the physical properties of input/output records, files, and units, or - the physical properties and implementation of storage.
1. 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. 2. 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. 3. Except where stated otherwise, requirements and prohibitions specified by this document apply to programs rather than processors. 4. 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/IEEE 60559:2011 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 1539-1:2018 is classified under the following ICS (International Classification for Standards) categories: 35.060 - Languages used in information technology. The ICS classification helps identify the subject area and facilitates finding related standards.
ISO/IEC 1539-1:2018 has the following relationships with other standards: It is inter standard links to ISO 14031:2021, ISO/IEC 1539-1:2018/Cor 2:2023, ISO/IEC 1539-1:2018/Cor 1:2021, ISO/IEC 1539-1:2023, ISO/IEC 1539-1:2010/Cor 1:2012, ISO/IEC 1539-1:2010. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.
You can purchase ISO/IEC 1539-1:2018 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 1539-1
Fourth edition
2018-11
Information technology —
Programming languages — Fortran —
Part 1:
Base language
Technologies de l'information — Langages de programmation —
Fortran —
Partie 1: Langage de base
Reference number
©
ISO/IEC 2018
© ISO/IEC 2018
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting
on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address
below or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Fax: +41 22 749 09 47
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO/IEC 2018 – All rights reserved
ISO/IEC 1539-1:2018 (E)
Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Normative references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Terms and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4 Notation, conformance, and compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1 Notation, symbols and abbreviated terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1.1 Syntax rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1.2 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.3 Assumed syntax rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.4 Syntax conventions and characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.5 Text conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2 Conformance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3 Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.1 Previous Fortran standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.2 New intrinsic procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.3 Fortran 2008 compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.4 Fortran 2003 compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.5 Fortran 95 compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3.6 Fortran 90 compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3.7 FORTRAN 77 compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.4 Deleted and obsolescent features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4.2 Nature of deleted features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4.3 Nature of obsolescent features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5 Fortran concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.1 High level syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.2 Program unit concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2.1 Program units and scoping units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2.2 Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2.3 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2.4 Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.2.5 Submodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3 Execution concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3.1 Statement classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3.2 Statement order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.3.3 The END statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.3.4 Program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.3.5 Execution sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.3.6 Image execution states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
c
⃝ ISO/IEC 2018 – All rights reserved iii
ISO/IEC 1539-1:2018 (E)
5.3.7 Termination of execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.4 Data concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.4.1 Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.4.2 Data value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.4.3 Data entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.4.4 Definition of objects and pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.4.5 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.4.6 Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.4.7 Coarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.4.8 Established coarrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4.9 Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4.10 Allocatable variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4.11 Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.5 Fundamental concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5.1 Names and designators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5.2 Statement keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5.3 Other keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5.4 Association . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5.5 Intrinsic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5.6 Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.5.7 Companion processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6 Lexical tokens and source form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1 Processor character set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.1 Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.2 Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.3 Digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.4 Underscore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.5 Special characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.6 Other characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.2 Low-level syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.2.1 Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.2.2 Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.2.3 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.2.4 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.2.5 Statement labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.2.6 Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.3 Source form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.3.1 Program units, statements, and lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.3.2 Free source form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.3.3 Fixed source form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.4 Including source text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1 Characteristics of types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1.1 The concept of type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1.2 Type classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1.3 Set of values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1.4 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1.5 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.2 Type parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.3 Types, type specifiers, and values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.3.1 Relationship of types and values to objects . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.3.2 Type specifiers and type compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.4 Intrinsic types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
7.4.1 Classification and specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
c
iv ⃝ ISO/IEC 2018 – All rights reserved
ISO/IEC 1539-1:2018 (E)
7.4.2 Intrinsic operations on intrinsic types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
7.4.3 Numeric intrinsic types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
7.4.4 Character type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.4.5 Logical type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
7.5 Derived types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
7.5.1 Derived type concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
7.5.2 Derived-type definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
7.5.3 Derived-type parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
7.5.4 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
7.5.5 Type-bound procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.5.6 Final subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.5.7 Type extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.5.8 Derived-type values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.5.9 Derived-type specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.5.10 Construction of derived-type values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.5.11 Derived-type operations and assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
7.6 Enumerations and enumerators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
7.7 Binary, octal, and hexadecimal literal constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
7.8 Construction of array values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8 Attribute declarations and specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.1 Attributes of procedures and data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.2 Type declaration statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
8.3 Automatic data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.4 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.5 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.5.1 Attribute specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.5.2 Accessibility attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
8.5.3 ALLOCATABLE attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
8.5.4 ASYNCHRONOUS attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
8.5.5 BIND attribute for data entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
8.5.6 CODIMENSION attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
8.5.7 CONTIGUOUS attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.5.8 DIMENSION attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8.5.9 EXTERNAL attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
8.5.10 INTENT attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
8.5.11 INTRINSIC attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
8.5.12 OPTIONAL attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
8.5.13 PARAMETER attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
8.5.14 POINTER attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
8.5.15 PROTECTED attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
8.5.16 SAVE attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
8.5.17 TARGET attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
8.5.18 VALUE attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
8.5.19 VOLATILE attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
8.6 Attribute specification statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.6.1 Accessibility statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.6.2 ALLOCATABLE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
8.6.3 ASYNCHRONOUS statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
8.6.4 BIND statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
8.6.5 CODIMENSION statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
8.6.6 CONTIGUOUS statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.6.7 DATA statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.6.8 DIMENSION statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
8.6.9 INTENT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
8.6.10 OPTIONAL statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
c
⃝ ISO/IEC 2018 – All rights reserved v
ISO/IEC 1539-1:2018 (E)
8.6.11 PARAMETER statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.6.12 POINTER statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
8.6.13 PROTECTED statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
8.6.14 SAVE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
8.6.15 TARGET statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
8.6.16 VALUE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
8.6.17 VOLATILE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
8.7 IMPLICIT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
8.8 IMPORT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
8.9 NAMELIST statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
8.10 Storage association of data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
8.10.1 EQUIVALENCE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
8.10.2 COMMON statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
8.10.3 Restrictions on common and equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
9 Use of data objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
9.1 Designator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
9.2 Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
9.3 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
9.4 Scalars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
9.4.1 Substrings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
9.4.2 Structure components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
9.4.3 Coindexed named objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
9.4.4 Complex parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
9.4.5 Type parameter inquiry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
9.5 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
9.5.1 Order of reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
9.5.2 Whole arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
9.5.3 Array elements and array sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
9.5.4 Simply contiguous array designators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
9.6 Image selectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
9.7 Dynamic association . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
9.7.1 ALLOCATE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
9.7.2 NULLIFY statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
9.7.3 DEALLOCATE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
9.7.4 STAT= specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
9.7.5 ERRMSG= specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
10 Expressions and assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
10.1 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
10.1.1 Expression semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
10.1.2 Form of an expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
10.1.3 Precedence of operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
10.1.4 Evaluation of operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
10.1.5 Intrinsic operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
10.1.6 Defined operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
10.1.7 Evaluation of operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
10.1.8 Integrity of parentheses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
10.1.9 Type, type parameters, and shape of an expression . . . . . . . . . . . . . . . . . . . . . 155
10.1.10 Conformability rules for elemental operations . . . . . . . . . . . . . . . . . . . . . . . . 156
10.1.11 Specification expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
10.1.12 Constant expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
10.2 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
10.2.1 Assignment statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
10.2.2 Pointer assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
10.2.3 Masked array assignment – WHERE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
c
vi ⃝ ISO/IEC 2018 – All rights reserved
ISO/IEC 1539-1:2018 (E)
10.2.4 FORALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
11 Execution control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
11.1 Executable constructs containing blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
11.1.1 Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
11.1.2 Rules governing blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
11.1.3 ASSOCIATE construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
11.1.4 BLOCK construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
11.1.5 CHANGE TEAM construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
11.1.6 CRITICAL construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
11.1.7 DO construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
11.1.8 IF construct and statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
11.1.9 SELECT CASE construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
11.1.10 SELECT RANK construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
11.1.11 SELECT TYPE construct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
11.1.12 EXIT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
11.2 Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
11.2.1 Branch concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
11.2.2 GO TO statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
11.2.3 Computed GO TO statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
11.3 CONTINUE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
11.4 STOP and ERROR STOP statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
11.5 FAIL IMAGE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
11.6 Image execution control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
11.6.1 Image control statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
11.6.2 Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
11.6.3 SYNC ALL statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
11.6.4 SYNC IMAGES statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
11.6.5 SYNC MEMORY statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
11.6.6 SYNC TEAM statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
11.6.7 EVENT POST statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
11.6.8 EVENT WAIT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
11.6.9 FORM TEAM statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
11.6.10 LOCK and UNLOCK statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
11.6.11 STAT= and ERRMSG= specifiers in image control statements . . . . . . . . . . . . . . . 207
12 Input/output statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
12.1 Input/output concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
12.2 Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
12.2.1 Definition of a record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
12.2.2 Formatted record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
12.2.3 Unformatted record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
12.2.4 Endfile record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
12.3 External files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
12.3.1 External file concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
12.3.2 File existence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
12.3.3 File access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
12.3.4 File position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
12.3.5 File storage units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
12.4 Internal files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
12.5 File connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
12.5.1 Referring to a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
12.5.2 Connection modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
12.5.3 Unit existence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
12.5.4 Connection of a file to a unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
12.5.5 Preconnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
c
⃝ ISO/IEC 2018 – All rights reserved vii
ISO/IEC 1539-1:2018 (E)
12.5.6 OPEN statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
12.5.7 CLOSE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
12.6 Data transfer statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
12.6.1 Form of input and output statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
12.6.2 Control information list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
12.6.3 Data transfer input/output list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
12.6.4 Execution of a data transfer input/output statement . . . . . . . . . . . . . . . . . . . . 231
12.6.5 Termination of data transfer statements . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
12.7 Waiting on pending data transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
12.7.1 Wait operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
12.7.2 WAIT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
12.8 File positioning statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
12.8.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
12.8.2 BACKSPACE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
12.8.3 ENDFILE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
12.8.4 REWIND statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
12.9 FLUSH statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
12.10 File inquiry statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
12.10.1 Forms of the INQUIRE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
12.10.2 Inquiry specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
12.10.3 Inquire by output list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
12.11 Error, end-of-record, and end-of-file conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
12.11.1 Occurrence of input/output conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
12.11.2 Error conditions and the ERR= specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
12.11.3 End-of-file condition and the END= specifier . . . . . . . . . . . . . . . . . . . . . . . . . 253
12.11.4 End-of-record condition and the EOR= specifier . . . . . . . . . . . . . . . . . . . . . . . 254
12.11.5 IOSTAT= specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
12.11.6 IOMSG= specifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
12.12 Restrictions on input/output statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
13 Input/output editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
13.1 Format specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
13.2 Explicit format specification methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
13.2.1 FORMAT statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
13.2.2 Character format specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
13.3 Form of a format item list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
13.3.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
13.3.2 Edit descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
13.3.3 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
13.4 Interaction between input/output list and format . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
13.5 Positioning by format control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
13.6 Decimal symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
13.7 Data edit descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
13.7.1 Purpose of data edit descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
13.7.2 Numeric editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
13.7.3 Logical editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
13.7.4 Character editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
13.7.5 Generalized editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
13.7.6 User-defined derived-type editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
13.8 Control edit descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
13.8.1 Position edit descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
13.8.2 Slash editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
13.8.3 Colon editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
13.8.4 SS, SP, and S editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
13.8.5 P editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
13.8.6 BN and BZ editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
c
viii ⃝ ISO/IEC 2018 – All rights reserved
ISO/IEC 1539-1:2018 (E)
13.8.7 RU, RD, RZ, RN, RC, and RP editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
13.8.8 DC and DP editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.9 Character string edit descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.10 List-directed formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.10.1 Purpose of list-directed formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.10.2 Values and value separators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.10.3 List-directed input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
13.10.4 List-directed output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
13.11 Namelist formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
13.11.1 Purpose of namelist formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
13.11.2 Name-value subsequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
13.11.3 Namelist input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
13.11.4 Namelist output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
14 Program units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
14.1 Main program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
14.2 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
14.2.1 Module syntax and semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
14.2.2 The USE statement and use association . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
14.2.3 Submodules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
14.3 Block data program units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
15 Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
15.1 Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
15.2 Procedure classifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
15.2.1 Procedure classification by reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
15.2.2 Procedure classification by means of definition . . . . . . . . . . . . . . . . . . . . . . . . 289
15.3 Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
15.3.1 Characteristics of procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
15.3.2 Characteristics of dummy arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
15.3.3 Characteristics of function results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
15.4 Procedure interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
15.4.1 Interface and abstract interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
15.4.2 Implicit and explicit interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
15.4.3 Specification of the procedure interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
15.5 Procedure reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
15.5.1 Syntax of a procedure reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
15.5.2 Actual arguments, dummy arguments, and argument association . . . . . . . . . . . . . . 303
15.5.3 Function reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
15.5.4 Subroutine reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
15.5.5 Resolving named procedure references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
15.5.6 Resolving type-bound procedure references . . . . . . . . . . . . . . . . . . . . . . . . . . 316
15.6 Procedure definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
15.6.1 Intrinsic procedure definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
15.6.2 Procedures defined by subprograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
15.6.3 Definition and invocation of procedures by means other than Fortran . . . . . . . . . . . 322
15.6.4 Statement function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
15.7 Pure procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
15.8 Elemental procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
15.8.1 Elemental procedure declaration and interface . . . . . . . . . . . . . . . . . . . . . . . . 325
15.8.2 Elemental function actual arguments and results . . . . . . . . . . . . . . . . . . . . . . . 326
15.8.3 Elemental subroutine actual arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
16 Intrinsic procedures and modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
16.1 Classes of intrinsic procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
16.2 Arguments to intrinsic procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
c
⃝ ISO/IEC 2018 – All rights reserved ix
ISO/IEC 1539-1:2018 (E)
16.2.1 General rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
16.2.2 The shape of array arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
16.2.3 Mask arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
16.2.4 DIM arguments and reduction functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
16.3 Bit model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
16.3.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
16.3.2 Bit sequence comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
16.3.3 Bit sequences as arguments to INT and REAL . . . . . . . . . . . . . . . . . . . . . . . . 329
16.4 Numeric models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
16.5 Atomic subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
16.6 Collective subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
16.7 Standard generic intrinsic procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
16.8 Specific names for standard intrinsic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
16.9 Specifications of the standard intrinsic procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
16.9.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
16.10 Standard intrinsic modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
16.10.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
16.10.2 The ISO_FORTRAN_ENV intrinsic module . . . . . . . . . . . . . . . . . . . . . . . . 426
17 Exceptions and IEEE arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
17.1 Overview of IEEE arithmetic support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
17.2 Derived types, constants, and operators defined in the modules . . . . . . . . . . . . . . . . . . . 434
17.3 The exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
17.4 The rounding modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
17.5 Underflow mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
17.6 Halting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
17.7 The floating-point modes and status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
17.8 Exceptional values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
17.9 IEEE arithmetic . . . . . . . . . . . . .
...
The article discusses ISO/IEC 1539-1:2018, which is a standard for the Fortran programming language. The purpose of the standard is to ensure that Fortran programs can be portable, reliable, maintainable, and efficiently executed on different computing systems. It specifies the forms and interpretation of programs in Fortran, as well as the input and output data formats. The document applies to programs rather than processors. It does not cover topics such as program transformation, setup and control of program usage, transcription of programs or data, program and processor behavior when interpretation is not established, capacity limitations of computing systems, mechanism for determining the number of program images, physical properties of images and computational elements, physical properties of quantities and numeric computation on specific processors, physical properties of input/output records and storage implementation.
기사 제목: ISO/IEC 1539-1:2018 - 정보 기술 - 프로그래밍 언어 - 포트란 - 파트 1: 기본 언어 기사 내용: 1. 이 문서는 기본 포트란 언어로 표현된 프로그램의 형식과 해석을 명시합니다. 이 문서의 목적은 다양한 컴퓨팅 시스템에서 포트란 프로그램의 이식성, 신뢰성, 유지 보수 용이성 및 효율적인 실행을 촉진하는 것입니다. 2. 이 문서는 다음을 명시합니다. - 포트란 언어로 작성된 프로그램이 가질 수 있는 형식, - 프로그램과 데이터의 의미를 해석하는 규칙, - 이러한 프로그램을 처리하기 위한 입력 데이터의 형식, 및 - 이를 사용한 출력 데이터의 형식. 3. 본 문서에서 지정한 요구 사항과 금지 사항은 프로세서가 아닌 프로그램에 적용됩니다. 4. 이 문서는 다음 사항을 명시하지 않습니다. - 프로그램을 컴퓨팅 시스템에서 사용하기 위해 변환하는 메커니즘, - 컴퓨팅 시스템에서 프로그램 사용을 위한 설치 및 제어에 필요한 작업, - 프로그램 또는 해당 입력 또는 출력 데이터를 저장 매체로부터 전사하는 방법, - 본 문서가 해석을 정립하지 못할 때의 프로그램 및 프로세서 동작(단, 4.2의 항목 (2)에서 (10)까지의 프로세서 감지 및 보고 요구 사항은 예외), - 이미지의 최대 개수, 프로그램과 데이터의 크기 또는 복잡성이 특정 컴퓨팅 시스템이나 특정 프로세서의 용량을 초과하는 경우들, - 프로그램 이미지의 개수를 결정하는 메커니즘, - 이미지의 물리적 특성 또는 이미지와 컴퓨팅 시스템의 계산 요소 간의 관계, - 양의 표현의 물리적 특성 및 반올림, 근사 또는 계산하는 방법(단, 조건에 따라 ISO/IEC/IEEE 60559:2011을 참조함), - 입력/출력 레코드, 파일 및 유닛의 물리적 특성, 또는 - 저장소의 물리적 특성 및 구현.
記事タイトル:ISO/IEC 1539-1:2018 - 情報技術 - プログラミング言語 - フォートラン - パート1:ベース言語 記事内容:1. この文書は、基本的なFortran言語で表現されたプログラムの形式を定め、その解釈を確立します。この文書の目的は、異なるコンピューティングシステムでのFortranプログラムの移植性、信頼性、保守性、および効率的な実行を促進することです。2. この文書では、次のことを定めています。- Fortran言語で記述されたプログラムが取ることができる形式- プログラムおよびそのデータの意味を解釈するための規則- そのようなプログラムを処理するための入力データの形式- そのようなプログラムの使用によって生じる出力データの形式3. この文書で指定された要件および禁止事項は、プロセッサではなくプログラムに適用されます。4. この文書では、次のことは定めません。- プログラムがコンピューティングシステムで使用するために変換されるメカニズム- プログラムの使用の設定と制御に必要な操作- プログラムまたはその入出力データをストレージメディア間で転記する方法- この文書の解釈が確立されない場合のプログラムおよびプロセッサの動作(ただし、4.2の項目(2)から(10)の要件ではプロセッサの検出および報告要件が指定される)- プログラムのイメージの最大数、特定のコンピューティングシステムの容量を超えるプログラムとデータのサイズまたは複雑さ、プログラムイメージの数を決定するメカニズム- イメージの物理的特性またはイメージとコンピュータシステムの演算要素との関係- 量の表現の物理的特性、および特定のプロセッサ上での値の丸め、近似、または計算方法(ただし、条件の下でのISO/IEC/IEEE 60559:2011の参照に基づく)- 入出力レコード、ファイル、およびユニットの物理的特性- ストレージの物理的特性と実装。








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...