AS/NZS ISO/IEC 1539.1:2024

$425.04

Programming languages – Fortran, Part 1: Base language

AS/NZS ISO/IEC 1539.1:2024 identically adopts ISO/IEC 1539 1:2023, which specifies the form and establishes the interpretation of programs expressed in the base Fortran language

Table of contents
Header
About this publication
Preface
Foreword
Introduction
1 Scope
2 Normative references
3 Terms and definitions
4 Notation, conformance, and compatibility
4.1 Notation, symbols and abbreviated terms
4.1.1 Syntax rules
4.1.2 Constraints
4.1.3 Assumed syntax rules
4.1.4 Syntax conventions and characteristics
4.1.5 Text conventions
4.2 Conformance
4.3 Compatibility
4.3.1 Previous Fortran standards
4.3.2 New intrinsic procedures
4.3.3 Fortran 2018 compatibility
4.3.4 Fortran 2008 compatibility
4.3.5 Fortran 2003 compatibility
4.3.6 Fortran 95 compatibility
4.3.7 Fortran 90 compatibility
4.3.8 Fortran 77 compatibility
4.4 Deleted and obsolescent features
4.4.1 General
4.4.2 Nature of deleted features
4.4.3 Nature of obsolescent features
5 Fortran concepts
5.1 High level syntax
5.2 Program unit concepts
5.2.1 Program units and scoping units
5.2.2 Program
5.2.3 Procedure
5.2.4 Module
5.2.5 Submodule
5.3 Execution concepts
5.3.1 Statement classification
5.3.2 Statement order
5.3.3 The END statement
5.3.4 Program execution
5.3.5 Execution sequence
5.3.6 Image execution states
5.3.7 Termination of execution
5.4 Data concepts
5.4.1 Type
5.4.1.1 General
5.4.1.2 Intrinsic type
5.4.1.3 Derived type
5.4.2 Data value
5.4.3 Data entity
5.4.3.1 General
5.4.3.2 Data object
5.4.3.2.1 Data object classification
5.4.3.2.2 Variable
5.4.3.2.3 Constant
5.4.3.2.4 Subobject of a constant
5.4.3.3 Expression
5.4.3.4 Function reference
5.4.4 Definition of objects and pointers
5.4.5 Reference
5.4.6 Array
5.4.7 Coarray
5.4.8 Established coarrays
5.4.9 Pointer
5.4.10 Allocatable variables
5.4.11 Storage
5.5 Fundamental concepts
5.5.1 Names and designators
5.5.2 Statement keyword
5.5.3 Other keywords
5.5.4 Association
5.5.5 Intrinsic
5.5.6 Operator
5.5.7 Companion processors
6 Lexical tokens and source form
6.1 Processor character set
6.1.1 Characters
6.1.2 Letters
6.1.3 Digits
6.1.4 Underscore
6.1.5 Special characters
6.1.6 Other characters
6.2 Low-level syntax
6.2.1 Tokens
6.2.2 Names
6.2.3 Constants
6.2.4 Operators
6.2.5 Statement labels
6.2.6 Delimiters
6.3 Source form
6.3.1 Program units, statements, and lines
6.3.2 Free source form
6.3.2.1 Free form line length
6.3.2.2 Blank characters in free form
6.3.2.3 Free form commentary
6.3.2.4 Free form statement continuation
6.3.2.5 Free form statement termination
6.3.2.6 Free form statements
6.3.3 Fixed source form
6.3.3.1 General
6.3.3.2 Fixed form commentary
6.3.3.3 Fixed form statement continuation
6.3.3.4 Fixed form statement termination
6.3.3.5 Fixed form statements
6.4 Including source text
7 Types
7.1 Characteristics of types
7.1.1 The concept of type
7.1.2 Type classification
7.1.3 Set of values
7.1.4 Constants
7.1.5 Operations
7.2 Type parameters
7.3 Types, type specifiers, and values
7.3.1 Relationship of types and values to objects
7.3.2 Type specifiers
7.3.2.1 Type specifier syntax
7.3.2.2 TYPE type specifier
7.3.2.3 CLASS type specifier
7.3.3 Type compatibility
7.4 Intrinsic types
7.4.1 Classification and specification
7.4.2 Intrinsic operations on intrinsic types
7.4.3 Numeric intrinsic types
7.4.3.1 Integer type
7.4.3.2 Real type
7.4.3.3 Complex type
7.4.4 Character type
7.4.4.1 Character sets
7.4.4.2 Character type specifier
7.4.4.3 Character literal constant
7.4.4.4 Collating sequence
7.4.5 Logical type
7.5 Derived types
7.5.1 Derived type concepts
7.5.2 Derived-type definition
7.5.2.1 Syntax of a derived-type definition
7.5.2.2 Accessibility
7.5.2.3 Sequence type
7.5.2.4 Determination of derived types
7.5.3 Derived-type parameters
7.5.3.1 Type parameter definition statement
7.5.3.2 Type parameter order
7.5.4 Components
7.5.4.1 Component definition statement
7.5.4.2 Array components
7.5.4.3 Coarray components
7.5.4.4 Pointer components
7.5.4.5 The passed-object dummy argument
7.5.4.6 Default initialization for components
7.5.4.7 Component order
7.5.4.8 Component accessibility
7.5.5 Type-bound procedures
7.5.6 Final subroutines
7.5.6.1 FINAL statement
7.5.6.2 The finalization process
7.5.6.3 When finalization occurs
7.5.6.4 Entities that are not finalized
7.5.7 Type extension
7.5.7.1 Extensible, extended, and abstract types
7.5.7.2 Inheritance
7.5.7.3 Type-bound procedure overriding
7.5.8 Derived-type values
7.5.9 Derived-type specifier
7.5.10 Construction of derived-type values
7.5.11 Derived-type operations and assignment
7.6 Other nonintrinsic types
7.6.1 Interoperable enumerations and enum types
7.6.2 Enumeration types
7.7 Binary, octal, and hexadecimal literal constants
7.8 Construction of array values
8 Attribute declarations and specifications
8.1 Attributes of procedures and data objects
8.2 Type declaration statement
8.3 Automatic data objects
8.4 Initialization
8.5 Attributes
8.5.1 Attribute specification
8.5.2 Accessibility attribute
8.5.3 ALLOCATABLE attribute
8.5.4 ASYNCHRONOUS attribute
8.5.5 BIND attribute for data entities
8.5.6 CODIMENSION attribute
8.5.6.1 General
8.5.6.2 Allocatable coarray
8.5.6.3 Explicit-coshape coarray
8.5.7 CONTIGUOUS attribute
8.5.8 DIMENSION attribute
8.5.8.1 General
8.5.8.2 Explicit-shape array
8.5.8.3 Assumed-shape array
8.5.8.4 Deferred-shape array
8.5.8.5 Assumed-size array
8.5.8.6 Implied-shape array
8.5.8.7 Assumed-rank entity
8.5.9 EXTERNAL attribute
8.5.10 INTENT attribute
8.5.11 INTRINSIC attribute
8.5.12 OPTIONAL attribute
8.5.13 PARAMETER attribute
8.5.14 POINTER attribute
8.5.15 PROTECTED attribute
8.5.16 SAVE attribute
8.5.17 RANK clause
8.5.18 TARGET attribute
8.5.19 VALUE attribute
8.5.20 VOLATILE attribute
8.6 Attribute specification statements
8.6.1 Accessibility statement
8.6.2 ALLOCATABLE statement
8.6.3 ASYNCHRONOUS statement
8.6.4 BIND statement
8.6.5 CODIMENSION statement
8.6.6 CONTIGUOUS statement
8.6.7 DATA statement
8.6.8 DIMENSION statement
8.6.9 INTENT statement
8.6.10 OPTIONAL statement
8.6.11 PARAMETER statement
8.6.12 POINTER statement
8.6.13 PROTECTED statement
8.6.14 SAVE statement
8.6.15 TARGET statement
8.6.16 VALUE statement
8.6.17 VOLATILE statement
8.7 IMPLICIT statement
8.8 IMPORT statement
8.9 NAMELIST statement
8.10 Storage association of data objects
8.10.1 EQUIVALENCE statement
8.10.1.1 General
8.10.1.2 Equivalence association
8.10.1.3 Equivalence of default character objects
8.10.1.4 Array names and array element designators
8.10.1.5 Restrictions on EQUIVALENCE statements
8.10.2 COMMON statement
8.10.2.1 General
8.10.2.2 Common block storage sequence
8.10.2.3 Size of a common block
8.10.2.4 Common association
8.10.2.5 Differences between named common and blank common
8.10.3 Restrictions on common and equivalence
9 Use of data objects
9.1 Designator
9.2 Variable
9.3 Constants
9.4 Scalars
9.4.1 Substrings
9.4.2 Structure components
9.4.3 Coindexed named objects
9.4.4 Complex parts
9.4.5 Type parameter inquiry
9.5 Arrays
9.5.1 Order of reference
9.5.2 Whole arrays
9.5.3 Array elements and array sections
9.5.3.1 Syntax
9.5.3.2 Sequences of subscripts and subscript triplets
9.5.3.3 Array element order
9.5.3.4 Array sections
9.5.3.4.1 Section subscript lists
9.5.3.4.2 Subscript triplet
9.5.3.4.3 Vector subscript
9.5.4 Simply contiguous array designators
9.6 Image selectors
9.7 Dynamic association
9.7.1 ALLOCATE statement
9.7.1.1 Form of the ALLOCATE statement
9.7.1.2 Execution of an ALLOCATE statement
9.7.1.3 Allocation of allocatable variables
9.7.1.4 Allocation of pointer targets
9.7.2 NULLIFY statement
9.7.3 DEALLOCATE statement
9.7.3.1 Form of the DEALLOCATE statement
9.7.3.2 Deallocation of allocatable variables
9.7.3.3 Deallocation of pointer targets
9.7.4 STAT= specifier
9.7.5 ERRMSG= specifier
10 Expressions and assignment
10.1 Expressions
10.1.1 Expression semantics
10.1.2 Form of an expression
10.1.2.1 Overall expression syntax
10.1.2.2 Primary
10.1.2.3 Conditional expressions
10.1.2.4 Level-1 expressions
10.1.2.5 Level-2 expressions
10.1.2.6 Level-3 expressions
10.1.2.7 Level-4 expressions
10.1.2.8 Level-5 expressions
10.1.2.9 General form of an expression
10.1.3 Precedence of operators
10.1.4 Evaluation of operations
10.1.5 Intrinsic operations
10.1.5.1 Intrinsic operation classification
10.1.5.2 Numeric intrinsic operations
10.1.5.2.1 Interpretation of numeric intrinsic operations
10.1.5.2.2 Integer division
10.1.5.2.3 Complex exponentiation
10.1.5.2.4 Evaluation of numeric intrinsic operations
10.1.5.3 Character intrinsic operation
10.1.5.3.1 Interpretation of the character intrinsic operation
10.1.5.3.2 Evaluation of the character intrinsic operation
10.1.5.4 Logical intrinsic operations
10.1.5.4.1 Interpretation of logical intrinsic operations
10.1.5.4.2 Evaluation of logical intrinsic operations
10.1.5.5 Relational intrinsic operations
10.1.5.5.1 Interpretation of relational intrinsic operations
10.1.5.5.2 Evaluation of relational intrinsic operations
10.1.6 Defined operations
10.1.6.1 Definitions
10.1.6.2 Interpretation of a defined operation
10.1.6.3 Evaluation of a defined operation
10.1.7 Evaluation of operands
10.1.8 Integrity of parentheses
10.1.9 Type, type parameters, and shape of an expression
10.1.9.1 General
10.1.9.2 Type, type parameters, and shape of a primary
10.1.9.3 Type, type parameters, and shape of the result of an operation
10.1.10 Conformability rules for elemental operations
10.1.11 Specification expression
10.1.12 Constant expression
10.2 Assignment
10.2.1 Assignment statement
10.2.1.1 General form
10.2.1.2 Intrinsic assignment statement
10.2.1.3 Interpretation of intrinsic assignments
10.2.1.4 Defined assignment statement
10.2.1.5 Interpretation of defined assignment statements
10.2.2 Pointer assignment
10.2.2.1 General
10.2.2.2 Syntax of the pointer assignment statement
10.2.2.3 Data pointer assignment
10.2.2.4 Procedure pointer assignment
10.2.2.5 Examples of pointer assignment statements
10.2.3 Masked array assignment − WHERE
10.2.3.1 General form of the masked array assignment
10.2.3.2 Interpretation of masked array assignments
10.2.4 FORALL
10.2.4.1 Form of the FORALL Construct
10.2.4.2 Execution of the FORALL construct
10.2.4.2.1 Execution stages
10.2.4.2.2 Determination of the values for index variables
10.2.4.2.3 Evaluation of the mask expression
10.2.4.2.4 Execution of the FORALL body constructs
10.2.4.3 The FORALL statement
10.2.4.4 Restrictions on FORALL constructs and statements
11 Execution control
11.1 Executable constructs containing blocks
11.1.1 Blocks
11.1.2 Rules governing blocks
11.1.2.1 Control flow in blocks
11.1.2.2 Execution of a block
11.1.3 ASSOCIATE construct
11.1.3.1 Purpose and form of the ASSOCIATE construct
11.1.3.2 Execution of the ASSOCIATE construct
11.1.3.3 Other attributes of associate names
11.1.3.4 Examples of the ASSOCIATE construct
11.1.4 BLOCK construct
11.1.5 CHANGE TEAM construct
11.1.5.1 Purpose and form of the CHANGE TEAM construct
11.1.5.2 Execution of a CHANGE TEAM construct
11.1.6 CRITICAL construct
11.1.7 DO construct
11.1.7.1 Purpose and form of the DO construct
11.1.7.2 Form of the DO construct
11.1.7.3 Active and inactive DO constructs
11.1.7.4 Execution of a DO construct
11.1.7.4.1 Loop initiation
11.1.7.4.2 DO CONCURRENT loop control
11.1.7.4.3 The execution cycle
11.1.7.4.4 CYCLE statement
11.1.7.4.5 Loop termination
11.1.7.5 Additional semantics for DO CONCURRENT constructs
11.1.7.6 Examples of DO constructs
11.1.8 IF construct and statement
11.1.8.1 Purpose and form of the IF construct
11.1.8.2 Execution of an IF construct
11.1.8.3 Examples of IF constructs
11.1.8.4 IF statement
11.1.9 SELECT CASE construct
11.1.9.1 Purpose and form of the SELECT CASE construct
11.1.9.2 Execution of a SELECT CASE construct
11.1.9.3 Examples of SELECT CASE constructs
11.1.10 SELECT RANK construct
11.1.10.1 Purpose and form of the SELECT RANK construct
11.1.10.2 Execution of the SELECT RANK construct
11.1.10.3 Attributes of a SELECT RANK associate name
11.1.10.4 Examples of the SELECT RANK construct
11.1.11 SELECT TYPE construct
11.1.11.1 Purpose and form of the SELECT TYPE construct
11.1.11.2 Execution of the SELECT TYPE construct
11.1.11.3 Examples of the SELECT TYPE construct
11.1.12 EXIT statement
11.2 Branching
11.2.1 Branch concepts
11.2.2 GO TO statement
11.2.3 Computed GO TO statement
11.3 CONTINUE statement
11.4 STOP and ERROR STOP statements
11.5 FAIL IMAGE statement
11.6 NOTIFY WAIT statement
11.7 Image execution control
11.7.1 Image control statements
11.7.2 Segments
11.7.3 SYNC ALL statement
11.7.4 SYNC IMAGES statement
11.7.5 SYNC MEMORY statement
11.7.6 SYNC TEAM statement
11.7.7 EVENT POST statement
11.7.8 EVENT WAIT statement
11.7.9 FORM TEAM statement
11.7.10 LOCK and UNLOCK statements
11.7.11 STAT= and ERRMSG= specifiers in image control statements
12 Input/output statements
12.1 Input/output concepts
12.2 Records
12.2.1 Definition of a record
12.2.2 Formatted record
12.2.3 Unformatted record
12.2.4 Endfile record
12.3 External files
12.3.1 External file concepts
12.3.2 File existence
12.3.3 File access
12.3.3.1 File access methods
12.3.3.2 Sequential access
12.3.3.3 Direct access
12.3.3.4 Stream access
12.3.4 File position
12.3.4.1 General
12.3.4.2 Advancing and nonadvancing input/output
12.3.4.3 File position prior to data transfer
12.3.4.4 File position after data transfer
12.3.5 File storage units
12.4 Internal files
12.5 File connection
12.5.1 Referring to a file
12.5.2 Connection modes
12.5.3 Unit existence
12.5.4 Connection of a file to a unit
12.5.5 Preconnection
12.5.6 OPEN statement
12.5.6.1 General
12.5.6.2 Syntax of the OPEN statement
12.5.6.3 ACCESS= specifier in the OPEN statement
12.5.6.4 ACTION= specifier in the OPEN statement
12.5.6.5 ASYNCHRONOUS= specifier in the OPEN statement
12.5.6.6 BLANK= specifier in the OPEN statement
12.5.6.7 DECIMAL= specifier in the OPEN statement
12.5.6.8 DELIM= specifier in the OPEN statement
12.5.6.9 ENCODING= specifier in the OPEN statement
12.5.6.10 FILE= specifier in the OPEN statement
12.5.6.11 FORM= specifier in the OPEN statement
12.5.6.12 LEADING_ZERO= specifier in the OPEN statement
12.5.6.13 NEWUNIT= specifier in the OPEN statement
12.5.6.14 PAD= specifier in the OPEN statement
12.5.6.15 POSITION= specifier in the OPEN statement
12.5.6.16 RECL= specifier in the OPEN statement
12.5.6.17 ROUND= specifier in the OPEN statement
12.5.6.18 SIGN= specifier in the OPEN statement
12.5.6.19 STATUS= specifier in the OPEN statement
12.5.7 CLOSE statement
12.5.7.1 General
12.5.7.2 Syntax
12.5.7.3 STATUS= specifier in the CLOSE statement
12.6 Data transfer statements
12.6.1 Form of input and output statements
12.6.2 Control information list
12.6.2.1 Syntax
12.6.2.2 Format specification in a data transfer statement
12.6.2.3 NML= specifier in a data transfer statement
12.6.2.4 ADVANCE= specifier in a data transfer statement
12.6.2.5 ASYNCHRONOUS= specifier in a data transfer statement
12.6.2.6 BLANK= specifier in a data transfer statement
12.6.2.7 DECIMAL= specifier in a data transfer statement
12.6.2.8 DELIM= specifier in a data transfer statement
12.6.2.9 ID= specifier in a data transfer statement
12.6.2.10 LEADING_ZERO= specifier in a data transfer statement
12.6.2.11 PAD= specifier in a data transfer statement
12.6.2.12 POS= specifier in a data transfer statement
12.6.2.13 REC= specifier in a data transfer statement
12.6.2.14 ROUND= specifier in a data transfer statement
12.6.2.15 SIGN= specifier in a data transfer statement
12.6.2.16 SIZE= specifier in a data transfer statement
12.6.3 Data transfer input/output list
12.6.4 Execution of a data transfer input/output statement
12.6.4.1 Data transfer sequence of operations
12.6.4.2 Direction of data transfer
12.6.4.3 Identifying a unit
12.6.4.4 Establishing a format
12.6.4.5 Data transfer
12.6.4.5.1 General
12.6.4.5.2 Unformatted data transfer
12.6.4.5.3 Formatted data transfer
12.6.4.6 List-directed formatting
12.6.4.7 Namelist formatting
12.6.4.8 Defined input/output
12.6.4.8.1 General
12.6.4.8.2 Defined input/output procedures
12.6.4.8.3 Executing defined input/output data transfers
12.6.4.8.4 Resolving defined input/output procedure references
12.6.5 Termination of data transfer statements
12.7 Waiting on pending data transfer
12.7.1 Wait operation
12.7.2 WAIT statement
12.8 File positioning statements
12.8.1 Syntax
12.8.2 BACKSPACE statement
12.8.3 ENDFILE statement
12.8.4 REWIND statement
12.9 FLUSH statement
12.10 File inquiry statement
12.10.1 Forms of the INQUIRE statement
12.10.2 Inquiry specifiers
12.10.2.1 Syntax
12.10.2.2 FILE= specifier in the INQUIRE statement
12.10.2.3 ACCESS= specifier in the INQUIRE statement
12.10.2.4 ACTION= specifier in the INQUIRE statement
12.10.2.5 ASYNCHRONOUS= specifier in the INQUIRE statement
12.10.2.6 BLANK= specifier in the INQUIRE statement
12.10.2.7 DECIMAL= specifier in the INQUIRE statement
12.10.2.8 DELIM= specifier in the INQUIRE statement
12.10.2.9 DIRECT= specifier in the INQUIRE statement
12.10.2.10 ENCODING= specifier in the INQUIRE statement
12.10.2.11 EXIST= specifier in the INQUIRE statement
12.10.2.12 FORM= specifier in the INQUIRE statement
12.10.2.13 FORMATTED= specifier in the INQUIRE statement
12.10.2.14 ID= specifier in the INQUIRE statement
12.10.2.15 LEADING_ZERO= specifier in the INQUIRE statement
12.10.2.16 NAME= specifier in the INQUIRE statement
12.10.2.17 NAMED= specifier in the INQUIRE statement
12.10.2.18 NEXTREC= specifier in the INQUIRE statement
12.10.2.19 NUMBER= specifier in the INQUIRE statement
12.10.2.20 OPENED= specifier in the INQUIRE statement
12.10.2.21 PAD= specifier in the INQUIRE statement
12.10.2.22 PENDING= specifier in the INQUIRE statement
12.10.2.23 POS= specifier in the INQUIRE statement
12.10.2.24 POSITION= specifier in the INQUIRE statement
12.10.2.25 READ= specifier in the INQUIRE statement
12.10.2.26 READWRITE= specifier in the INQUIRE statement
12.10.2.27 RECL= specifier in the INQUIRE statement
12.10.2.28 ROUND= specifier in the INQUIRE statement
12.10.2.29 SEQUENTIAL= specifier in the INQUIRE statement
12.10.2.30 SIGN= specifier in the INQUIRE statement
12.10.2.31 SIZE= specifier in the INQUIRE statement
12.10.2.32 STREAM= specifier in the INQUIRE statement
12.10.2.33 UNFORMATTED= specifier in the INQUIRE statement
12.10.2.34 WRITE= specifier in the INQUIRE statement
12.10.3 Inquire by output list
12.11 Error, end-of-record, and end-of-file conditions
12.11.1 Occurrence of input/output conditions
12.11.2 Error conditions and the ERR= specifier
12.11.3 End-of-file condition and the END= specifier
12.11.4 End-of-record condition and the EOR= specifier
12.11.5 IOSTAT= specifier
12.11.6 IOMSG= specifier
12.12 Restrictions on input/output statements
13 Input/output editing
13.1 Format specifications
13.2 Explicit format specification methods
13.2.1 FORMAT statement
13.2.2 Character format specification
13.3 Form of a format item list
13.3.1 Syntax
13.3.2 Edit descriptors
13.3.3 Fields
13.4 Interaction between input/output list and format
13.5 Positioning by format control
13.6 Decimal symbol
13.7 Data edit descriptors
13.7.1 Purpose of data edit descriptors
13.7.2 Numeric editing
13.7.2.1 General rules
13.7.2.2 Integer editing
13.7.2.3 Real and complex editing
13.7.2.3.1 General
13.7.2.3.2 F editing
13.7.2.3.3 E and D editing
13.7.2.3.4 EN editing
13.7.2.3.5 ES editing
13.7.2.3.6 EX editing
13.7.2.3.7 Complex editing
13.7.2.3.8 Input/output rounding mode
13.7.2.4 B, O, and Z editing
13.7.3 Logical editing
13.7.4 Character editing
13.7.5 Generalized editing
13.7.5.1 Overview
13.7.5.2 Generalized numeric editing
13.7.5.2.1 Overview
13.7.5.2.2 Generalized integer and enum editing
13.7.5.2.3 Generalized real and complex editing
13.7.5.3 Generalized logical editing
13.7.5.4 Generalized character editing
13.7.6 User-defined derived-type editing
13.8 Control edit descriptors
13.8.1 Position edit descriptors
13.8.1.1 Position editing
13.8.1.2 T, TL, and TR editing
13.8.1.3 X editing
13.8.2 Slash editing
13.8.3 Colon editing
13.8.4 SS, SP, and S editing
13.8.5 LZS, LZP and LZ editing
13.8.6 P editing
13.8.7 BN and BZ editing
13.8.8 RU, RD, RZ, RN, RC, and RP editing
13.8.9 DC and DP editing
13.9 Character string edit descriptors
13.10 List-directed formatting
13.10.1 Purpose of list-directed formatting
13.10.2 Values and value separators
13.10.3 List-directed input
13.10.3.1 List-directed input forms
13.10.3.2 Null values
13.10.4 List-directed output
13.11 Namelist formatting
13.11.1 Purpose of namelist formatting
13.11.2 Name-value subsequences
13.11.3 Namelist input
13.11.3.1 Overall syntax
13.11.3.2 Namelist input processing
13.11.3.3 Namelist input values
13.11.3.4 Null values
13.11.3.5 Blanks
13.11.3.6 Namelist comments
13.11.4 Namelist output
13.11.4.1 Form of namelist output
13.11.4.2 Namelist output editing
13.11.4.3 Namelist output records
14 Program units
14.1 Main program
14.2 Modules
14.2.1 Module syntax and semantics
14.2.2 The USE statement and use association
14.2.3 Submodules
14.3 Block data program units
15 Procedures
15.1 Concepts
15.2 Procedure classifications
15.2.1 Procedure classification by reference
15.2.2 Procedure classification by means of definition
15.2.2.1 Intrinsic procedures
15.2.2.2 External, internal, and module procedures
15.2.2.3 Dummy procedures
15.2.2.4 Procedure pointers
15.2.2.5 Statement functions
15.3 Characteristics
15.3.1 Characteristics of procedures
15.3.2 Characteristics of dummy arguments
15.3.2.1 General
15.3.2.2 Characteristics of dummy data objects
15.3.2.3 Characteristics of dummy procedures
15.3.2.4 Characteristics of asterisk dummy arguments
15.3.3 Characteristics of function results
15.4 Procedure interface
15.4.1 Interface and abstract interface
15.4.2 Implicit and explicit interfaces
15.4.2.1 Interfaces and scopes
15.4.2.2 Explicit interface
15.4.3 Specification of the procedure interface
15.4.3.1 General
15.4.3.2 Interface block
15.4.3.3 GENERIC statement
15.4.3.4 Generic interfaces
15.4.3.4.1 Generic identifiers
15.4.3.4.2 Defined operations
15.4.3.4.3 Defined assignments
15.4.3.4.4 Defined input/output procedure interfaces
15.4.3.4.5 Restrictions on generic declarations
15.4.3.5 EXTERNAL statement
15.4.3.6 Procedure declaration statement
15.4.3.7 INTRINSIC statement
15.4.3.8 Implicit interface specification
15.5 Procedure reference
15.5.1 Syntax of a procedure reference
15.5.2 Actual arguments, dummy arguments, and argument association
15.5.2.1 Argument correspondence
15.5.2.2 The passed-object dummy argument and argument correspondence
15.5.2.3 Conditional argument correspondence
15.5.2.4 Argument association
15.5.2.5 Ordinary dummy variables
15.5.2.6 Allocatable and pointer dummy variables
15.5.2.7 Allocatable dummy variables
15.5.2.8 Pointer dummy variables
15.5.2.9 Coarray dummy variables
15.5.2.10 Actual arguments associated with dummy procedure entities
15.5.2.11 Actual arguments and alternate return indicators
15.5.2.12 Sequence association
15.5.2.13 Argument presence and restrictions on arguments not present
15.5.2.14 Restrictions on entities associated with dummy arguments
15.5.3 Function reference
15.5.4 Subroutine reference
15.5.5 Resolving named procedure references
15.5.5.1 Establishment of procedure names
15.5.5.2 Resolving procedure references to names established to be generic
15.5.5.3 Resolving procedure references to names established to be only specific
15.5.5.4 Resolving procedure references to names not established
15.5.6 Resolving type-bound procedure references
15.6 Procedure definition
15.6.1 Intrinsic procedure definition
15.6.2 Procedures defined by subprograms
15.6.2.1 General
15.6.2.2 Function subprogram
15.6.2.3 Subroutine subprogram
15.6.2.4 Instances of a subprogram
15.6.2.5 Separate module procedures
15.6.2.6 ENTRY statement
15.6.2.7 RETURN statement
15.6.2.8 CONTAINS statement
15.6.3 Definition and invocation of procedures by means other than Fortran
15.6.4 Statement function
15.7 Pure procedures
15.8 Simple procedures
15.9 Elemental procedures
15.9.1 Elemental procedure declaration and interface
15.9.2 Elemental function actual arguments and results
15.9.3 Elemental subroutine actual arguments
16 Intrinsic procedures and modules
16.1 Classes of intrinsic procedures
16.2 Arguments to intrinsic procedures
16.2.1 General rules
16.2.2 The shape of array arguments
16.2.3 Mask arguments
16.2.4 DIM arguments and reduction functions
16.3 Bit model
16.3.1 General
16.3.2 Bit sequence comparisons
16.3.3 Bit sequences as arguments to INT and REAL
16.4 Numeric models
16.5 Atomic subroutines
16.6 Collective subroutines
16.7 Standard generic intrinsic procedures
16.8 Specific names for standard intrinsic functions
16.9 Specifications of the standard intrinsic procedures
16.9.1 General
16.9.2 ABS (A)
16.9.3 ACHAR (I [, KIND])
16.9.4 ACOS (X)
16.9.5 ACOSD (X)
16.9.6 ACOSH (X)
16.9.7 ACOSPI (X)
16.9.8 ADJUSTL (STRING)
16.9.9 ADJUSTR (STRING)
16.9.10 AIMAG (Z)
16.9.11 AINT (A [, KIND])
16.9.12 ALL (MASK) or ALL (MASK, DIM)
16.9.13 ALLOCATED (ARRAY) or ALLOCATED (SCALAR)
16.9.14 ANINT (A [, KIND])
16.9.15 ANY (MASK) or ANY (MASK, DIM)
16.9.16 ASIN (X)
16.9.17 ASIND (X)
16.9.18 ASINH (X)
16.9.19 ASINPI (X)
16.9.20 ASSOCIATED (POINTER [, TARGET])
16.9.21 ATAN (X) or ATAN (Y, X)
16.9.22 ATAN2 (Y, X)
16.9.23 ATAN2D (Y, X)
16.9.24 ATAN2PI (Y, X)
16.9.25 ATAND (X) or ATAND (Y, X)
16.9.26 ATANH (X)
16.9.27 ATANPI (X) or ATANPI (Y, X)
16.9.28 ATOMIC_ADD (ATOM, VALUE [, STAT])
16.9.29 ATOMIC_AND (ATOM, VALUE [, STAT])
16.9.30 ATOMIC_CAS (ATOM, OLD, COMPARE, NEW [, STAT])
16.9.31 ATOMIC_DEFINE (ATOM, VALUE [, STAT])
16.9.32 ATOMIC_FETCH_ADD (ATOM, VALUE, OLD [, STAT])
16.9.33 ATOMIC_FETCH_AND (ATOM, VALUE, OLD [, STAT])
16.9.34 ATOMIC_FETCH_OR (ATOM, VALUE, OLD [, STAT])
16.9.35 ATOMIC_FETCH_XOR (ATOM, VALUE, OLD [, STAT])
16.9.36 ATOMIC_OR (ATOM, VALUE [, STAT])
16.9.37 ATOMIC_REF (VALUE, ATOM [, STAT])
16.9.38 ATOMIC_XOR (ATOM, VALUE [, STAT])
16.9.39 BESSEL_J0 (X)
16.9.40 BESSEL_J1 (X)
16.9.41 BESSEL_JN (N, X) or BESSEL_JN (N1, N2, X)
16.9.42 BESSEL_Y0 (X)
16.9.43 BESSEL_Y1 (X)
16.9.44 BESSEL_YN (N, X) or BESSEL_YN (N1, N2, X)
16.9.45 BGE (I, J)
16.9.46 BGT (I, J)
16.9.47 BIT_SIZE (I)
16.9.48 BLE (I, J)
16.9.49 BLT (I, J)
16.9.50 BTEST (I, POS)
16.9.51 CEILING (A [, KIND])
16.9.52 CHAR (I [, KIND])
16.9.53 CMPLX (X [, KIND]) or CMPLX (X [, Y, KIND])
16.9.54 CO_BROADCAST (A, SOURCE_IMAGE [, STAT, ERRMSG])
16.9.55 CO_MAX (A [, RESULT_IMAGE, STAT, ERRMSG])
16.9.56 CO_MIN (A [, RESULT_IMAGE, STAT, ERRMSG])
16.9.57 CO_REDUCE (A, OPERATION [, RESULT_IMAGE, STAT, ERRMSG])
16.9.58 CO_SUM (A [, RESULT_IMAGE, STAT, ERRMSG])
16.9.59 COMMAND_ARGUMENT_COUNT ( )
16.9.60 CONJG (Z)
16.9.61 COS (X)
16.9.62 COSD (X)
16.9.63 COSH (X)
16.9.64 COSHAPE (COARRAY [, KIND])
16.9.65 COSPI (X)
16.9.66 COUNT (MASK [, DIM, KIND])
16.9.67 CPU_TIME (TIME)
16.9.68 CSHIFT (ARRAY, SHIFT [, DIM])
16.9.69 DATE_AND_TIME ([DATE, TIME, ZONE, VALUES])
16.9.70 DBLE (A)
16.9.71 DIGITS (X)
16.9.72 DIM (X, Y)
16.9.73 DOT_PRODUCT (VECTOR_A, VECTOR_B)
16.9.74 DPROD (X, Y)
16.9.75 DSHIFTL (I, J, SHIFT)
16.9.76 DSHIFTR (I, J, SHIFT)
16.9.77 EOSHIFT (ARRAY, SHIFT [, BOUNDARY, DIM])
16.9.78 EPSILON (X)
16.9.79 ERF (X)
16.9.80 ERFC (X)
16.9.81 ERFC_SCALED (X)
16.9.82 EVENT_QUERY (EVENT, COUNT [, STAT])
16.9.83 EXECUTE_COMMAND_LINE (COMMAND [, WAIT, EXITSTAT, CMDSTAT, CMDMSG ])
16.9.84 EXP (X)
16.9.85 EXPONENT (X)
16.9.86 EXTENDS_TYPE_OF (A, MOLD)
16.9.87 FAILED_IMAGES ([TEAM, KIND])
16.9.88 FINDLOC (ARRAY, VALUE, DIM [, MASK, KIND, BACK]) or FINDLOC (ARRAY, VALUE [, MASK, KIND, BACK])
16.9.89 FLOOR (A [, KIND])
16.9.90 FRACTION (X)
16.9.91 GAMMA (X)
16.9.92 GET_COMMAND ([COMMAND, LENGTH, STATUS, ERRMSG])
16.9.93 GET_COMMAND_ARGUMENT (NUMBER [, VALUE, LENGTH, STATUS, ERRMSG])
16.9.94 GET_ENVIRONMENT_VARIABLE (NAME [, VALUE, LENGTH, STATUS, TRIM_NAME, ERRMSG])
16.9.95 GET_TEAM ([LEVEL])
16.9.96 HUGE (X)
16.9.97 HYPOT (X, Y)
16.9.98 IACHAR (C [, KIND])
16.9.99 IALL (ARRAY, DIM [, MASK]) or IALL (ARRAY [, MASK])
16.9.100 IAND (I, J)
16.9.101 IANY (ARRAY, DIM [, MASK]) or IANY (ARRAY [, MASK])
16.9.102 IBCLR (I, POS)
16.9.103 IBITS (I, POS, LEN)
16.9.104 IBSET (I, POS)
16.9.105 ICHAR (C [, KIND])
16.9.106 IEOR (I, J)
16.9.107 IMAGE_INDEX (COARRAY, SUB) or (COARRAY, SUB, TEAM) or (COARRAY, SUB, TEAM_NUMBER)
16.9.108 IMAGE_STATUS (IMAGE [, TEAM])
16.9.109 INDEX (STRING, SUBSTRING [, BACK, KIND])
16.9.110 INT (A [, KIND])
16.9.111 IOR (I, J)
16.9.112 IPARITY (ARRAY, DIM [, MASK]) or IPARITY (ARRAY [, MASK])
16.9.113 ISHFT (I, SHIFT)
16.9.114 ISHFTC (I, SHIFT [, SIZE])
16.9.115 IS_CONTIGUOUS (ARRAY)
16.9.116 IS_IOSTAT_END (I)
16.9.117 IS_IOSTAT_EOR (I)
16.9.118 KIND (X)
16.9.119 LBOUND (ARRAY [, DIM, KIND])
16.9.120 LCOBOUND (COARRAY [, DIM, KIND])
16.9.121 LEADZ (I)
16.9.122 LEN (STRING [, KIND])
16.9.123 LEN_TRIM (STRING [, KIND])
16.9.124 LGE (STRING_A, STRING_B)
16.9.125 LGT (STRING_A, STRING_B)
16.9.126 LLE (STRING_A, STRING_B)
16.9.127 LLT (STRING_A, STRING_B)
16.9.128 LOG (X)
16.9.129 LOG_GAMMA (X)
16.9.130 LOG10 (X)
16.9.131 LOGICAL (L [, KIND])
16.9.132 MASKL (I [, KIND])
16.9.133 MASKR (I [, KIND])
16.9.134 MATMUL (MATRIX_A, MATRIX_B)
16.9.135 MAX (A1, A2 [, A3, …])
16.9.136 MAXEXPONENT (X)
16.9.137 MAXLOC (ARRAY, DIM [, MASK, KIND, BACK]) or MAXLOC (ARRAY [, MASK, KIND, BACK])
16.9.138 MAXVAL (ARRAY, DIM [, MASK]) or MAXVAL (ARRAY [, MASK])
16.9.139 MERGE (TSOURCE, FSOURCE, MASK)
16.9.140 MERGE_BITS (I, J, MASK)
16.9.141 MIN (A1, A2 [, A3, …])
16.9.142 MINEXPONENT (X)
16.9.143 MINLOC (ARRAY, DIM [, MASK, KIND, BACK]) or MINLOC (ARRAY [, MASK, KIND, BACK])
16.9.144 MINVAL (ARRAY, DIM [, MASK]) or MINVAL (ARRAY [, MASK])
16.9.145 MOD (A, P)
16.9.146 MODULO (A, P)
16.9.147 MOVE_ALLOC (FROM, TO [, STAT, ERRMSG])
16.9.148 MVBITS (FROM, FROMPOS, LEN, TO, TOPOS)
16.9.149 NEAREST (X, S)
16.9.150 NEW_LINE (A)
16.9.151 NEXT (A [, STAT])
16.9.152 NINT (A [, KIND])
16.9.153 NORM2 (X) or NORM2 (X, DIM)
16.9.154 NOT (I)
16.9.155 NULL ([MOLD])
16.9.156 NUM_IMAGES ( ) or NUM_IMAGES (TEAM) or NUM_IMAGES (TEAM_NUMBER)
16.9.157 OUT_OF_RANGE (X, MOLD [, ROUND])
16.9.158 PACK (ARRAY, MASK [, VECTOR])
16.9.159 PARITY (MASK) or PARITY (MASK, DIM)
16.9.160 POPCNT (I)
16.9.161 POPPAR (I)
16.9.162 PRECISION (X)
16.9.163 PRESENT (A)
16.9.164 PREVIOUS (A [, STAT])
16.9.165 PRODUCT (ARRAY, DIM [, MASK]) or PRODUCT (ARRAY [, MASK])
16.9.166 RADIX (X)
16.9.167 RANDOM_INIT (REPEATABLE, IMAGE_DISTINCT)
16.9.168 RANDOM_NUMBER (HARVEST)
16.9.169 RANDOM_SEED ([SIZE, PUT, GET])
16.9.170 RANGE (X)
16.9.171 RANK (A)
16.9.172 REAL (A [, KIND])
16.9.173 REDUCE (ARRAY, OPERATION [, MASK, IDENTITY, ORDERED]) or REDUCE (ARRAY, OPERATION, DIM [, MASK, IDENTITY, ORDERED])
16.9.174 REPEAT (STRING, NCOPIES)
16.9.175 RESHAPE (SOURCE, SHAPE [, PAD, ORDER])
16.9.176 RRSPACING (X)
16.9.177 SAME_TYPE_AS (A, B)
16.9.178 SCALE (X, I)
16.9.179 SCAN (STRING, SET [, BACK, KIND])
16.9.180 SELECTED_CHAR_KIND (NAME)
16.9.181 SELECTED_INT_KIND (R)
16.9.182 SELECTED_LOGICAL_KIND (BITS)
16.9.183 SELECTED_REAL_KIND ([P, R, RADIX])
16.9.184 SET_EXPONENT (X, I)
16.9.185 SHAPE (SOURCE [, KIND])
16.9.186 SHIFTA (I, SHIFT)
16.9.187 SHIFTL (I, SHIFT)
16.9.188 SHIFTR (I, SHIFT)
16.9.189 SIGN (A, B)
16.9.190 SIN (X)
16.9.191 SIND (X)
16.9.192 SINH (X)
16.9.193 SINPI (X)
16.9.194 SIZE (ARRAY [, DIM, KIND])
16.9.195 SPACING (X)
16.9.196 SPLIT (STRING, SET, POS [, BACK])
16.9.197 SPREAD (SOURCE, DIM, NCOPIES)
16.9.198 SQRT (X)
16.9.199 STOPPED_IMAGES ([TEAM, KIND])
16.9.200 STORAGE_SIZE (A [, KIND])
16.9.201 SUM (ARRAY, DIM [, MASK]) or SUM (ARRAY [, MASK])
16.9.202 SYSTEM_CLOCK ([COUNT, COUNT_RATE, COUNT_MAX])
16.9.203 TAN (X)
16.9.204 TAND (X)
16.9.205 TANH (X)
16.9.206 TANPI (X)
16.9.207 TEAM_NUMBER ([TEAM])
16.9.208 THIS_IMAGE ([TEAM]) or THIS_IMAGE (COARRAY [, TEAM]) or THIS_IMAGE (COARRAY, DIM [, TEAM])
16.9.209 TINY (X)
16.9.210 TOKENIZE (STRING, SET, TOKENS [, SEPARATOR]) or TOKENIZE (STRING, SET, FIRST, LAST)
16.9.211 TRAILZ (I)
16.9.212 TRANSFER (SOURCE, MOLD [, SIZE])
16.9.213 TRANSPOSE (MATRIX)
16.9.214 TRIM (STRING)
16.9.215 UBOUND (ARRAY [, DIM, KIND])
16.9.216 UCOBOUND (COARRAY [, DIM, KIND])
16.9.217 UNPACK (VECTOR, MASK, FIELD)
16.9.218 VERIFY (STRING, SET [, BACK, KIND])
16.10 Standard intrinsicmodules
16.10.1 General
16.10.2 The ISO_FORTRAN_ENV intrinsic module
16.10.2.1 General
16.10.2.2 ATOMIC_INT_KIND
16.10.2.3 ATOMIC_LOGICAL_KIND
16.10.2.4 CHARACTER_KINDS
16.10.2.5 CHARACTER_STORAGE_SIZE
16.10.2.6 COMPILER_OPTIONS ( )
16.10.2.7 COMPILER_VERSION ( )
16.10.2.8 CURRENT_TEAM
16.10.2.9 ERROR_UNIT
16.10.2.10 EVENT_TYPE
16.10.2.11 FILE_STORAGE_SIZE
16.10.2.12 INITIAL_TEAM
16.10.2.13 INPUT_UNIT
16.10.2.14 INT8, INT16, INT32, and INT64
16.10.2.15 INTEGER_KINDS
16.10.2.16 IOSTAT_END
16.10.2.17 IOSTAT_EOR
16.10.2.18 IOSTAT_INQUIRE_INTERNAL_UNIT
16.10.2.19 LOCK_TYPE
16.10.2.20 LOGICAL_KINDS
16.10.2.21 LOGICAL8, LOGICAL16, LOGICAL32, and LOGICAL64
16.10.2.22 NOTIFY_TYPE
16.10.2.23 NUMERIC_STORAGE_SIZE
16.10.2.24 OUTPUT_UNIT
16.10.2.25 PARENT_TEAM
16.10.2.26 REAL_KINDS
16.10.2.27 REAL16, REAL32, REAL64, and REAL128
16.10.2.28 STAT_FAILED_IMAGE
16.10.2.29 STAT_LOCKED
16.10.2.30 STAT_LOCKED_OTHER_IMAGE
16.10.2.31 STAT_STOPPED_IMAGE
16.10.2.32 STAT_UNLOCKED
16.10.2.33 STAT_UNLOCKED_FAILED_IMAGE
16.10.2.34 TEAM_TYPE
16.10.2.35 Uniqueness of named constant values
17 Exceptions and IEEE arithmetic
17.1 Overview of IEEE arithmetic support
17.2 Derived types, constants, and operators defined in the modules
17.3 The exceptions
17.4 The rounding modes
17.5 Underflow mode
17.6 Halting
17.7 The floating-point modes and status
17.8 Exceptional values
17.9 IEEE arithmetic
17.10 Summary of the procedures
17.11 Specifications of the procedures
17.11.1 General
17.11.2 IEEE_CLASS (X)
17.11.3 IEEE_COPY_SIGN (X, Y)
17.11.4 IEEE_FMA (A, B, C)
17.11.5 IEEE_GET_FLAG (FLAG, FLAG_VALUE)
17.11.6 IEEE_GET_HALTING_MODE (FLAG, HALTING)
17.11.7 IEEE_GET_MODES (MODES)
17.11.8 IEEE_GET_ROUNDING_MODE (ROUND_VALUE [, RADIX])
17.11.9 IEEE_GET_STATUS (STATUS_VALUE)
17.11.10 IEEE_GET_UNDERFLOW_MODE (GRADUAL)
17.11.11 IEEE_INT (A, ROUND [, KIND])
17.11.12 IEEE_IS_FINITE (X)
17.11.13 IEEE_IS_NAN (X)
17.11.14 IEEE_IS_NEGATIVE (X)
17.11.15 IEEE_IS_NORMAL (X)
17.11.16 IEEE_LOGB (X)
17.11.17 IEEE_MAX (X, Y)
17.11.18 IEEE_MAX_MAG (X, Y)
17.11.19 IEEE_MAX_NUM (X, Y)
17.11.20 IEEE_MAX_NUM_MAG (X, Y)
17.11.21 IEEE_MIN (X, Y)
17.11.22 IEEE_MIN_MAG (X, Y)
17.11.23 IEEE_MIN_NUM (X, Y)
17.11.24 IEEE_MIN_NUM_MAG (X, Y)
17.11.25 IEEE_NEXT_AFTER (X, Y)
17.11.26 IEEE_NEXT_DOWN (X)
17.11.27 IEEE_NEXT_UP (X)
17.11.28 IEEE_QUIET_EQ (A, B)
17.11.29 IEEE_QUIET_GE (A, B)
17.11.30 IEEE_QUIET_GT (A, B)
17.11.31 IEEE_QUIET_LE (A, B)
17.11.32 IEEE_QUIET_LT (A, B)
17.11.33 IEEE_QUIET_NE (A, B)
17.11.34 IEEE_REAL (A [, KIND])
17.11.35 IEEE_REM (X, Y)
17.11.36 IEEE_RINT (X [, ROUND])
17.11.37 IEEE_SCALB (X, I)
17.11.38 IEEE_SELECTED_REAL_KIND ([P, R, RADIX])
17.11.39 IEEE_SET_FLAG (FLAG, FLAG_VALUE)
17.11.40 IEEE_SET_HALTING_MODE (FLAG, HALTING)
17.11.41 IEEE_SET_MODES (MODES)
17.11.42 IEEE_SET_ROUNDING_MODE (ROUND_VALUE [, RADIX])
17.11.43 IEEE_SET_STATUS (STATUS_VALUE)
17.11.44 IEEE_SET_UNDERFLOW_MODE (GRADUAL)
17.11.45 IEEE_SIGNALING_EQ (A, B)
17.11.46 IEEE_SIGNALING_GE (A, B)
17.11.47 IEEE_SIGNALING_GT (A, B)
17.11.48 IEEE_SIGNALING_LE (A, B)
17.11.49 IEEE_SIGNALING_LT (A, B)
17.11.50 IEEE_SIGNALING_NE (A, B)
17.11.51 IEEE_SIGNBIT (X)
17.11.52 IEEE_SUPPORT_DATATYPE () or IEEE_SUPPORT_DATATYPE (X)
17.11.53 IEEE_SUPPORT_DENORMAL () or IEEE_SUPPORT_DENORMAL (X)
17.11.54 IEEE_SUPPORT_DIVIDE () or IEEE_SUPPORT_DIVIDE (X)
17.11.55 IEEE_SUPPORT_FLAG (FLAG) or IEEE_SUPPORT_FLAG (FLAG, X)
17.11.56 IEEE_SUPPORT_HALTING (FLAG)
17.11.57 IEEE_SUPPORT_INF () or IEEE_SUPPORT_INF (X)
17.11.58 IEEE_SUPPORT_IO () or IEEE_SUPPORT_IO (X)
17.11.59 IEEE_SUPPORT_NAN () or IEEE_SUPPORT_NAN (X)
17.11.60 IEEE_SUPPORT_ROUNDING (ROUND_VALUE) or IEEE_SUPPORT_ROUNDING (ROUND_VALUE, X)
17.11.61 IEEE_SUPPORT_SQRT () or IEEE_SUPPORT_SQRT (X)
17.11.62 IEEE_SUPPORT_STANDARD () or IEEE_SUPPORT_STANDARD (X)
17.11.63 IEEE_SUPPORT_SUBNORMAL () or IEEE_SUPPORT_SUBNORMAL (X)
17.11.64 IEEE_SUPPORT_UNDERFLOW_CONTROL () or IEEE_SUPPORT_UNDERFLOW_CONTROL (X)
17.11.65 IEEE_UNORDERED (X, Y)
17.11.66 IEEE_VALUE (X, CLASS)
17.12 Examples
18 Interoperability with C
18.1 General
18.2 The ISO_C_BINDING intrinsic module
18.2.1 Summary of contents
18.2.2 Named constants and derived types in the module
18.2.3 Procedures in the module
18.2.3.1 General
18.2.3.2 C_ASSOCIATED (C_PTR_1 [, C_PTR_2])
18.2.3.3 C_F_POINTER (CPTR, FPTR [, SHAPE, LOWER])
18.2.3.4 C_F_PROCPOINTER (CPTR, FPTR)
18.2.3.5 C_F_STRPOINTER (CSTRARRAY, FSTRPTR [, NCHARS]) or C_F_STRPOINTER (CSTRPTR, FSTRPTR [, NCHARS])
18.2.3.6 C_FUNLOC (X)
18.2.3.7 C_LOC (X)
18.2.3.8 C_SIZEOF (X)
18.2.3.9 F_C_STRING (STRING [, ASIS])
18.3 Interoperability between Fortran and C entities
18.3.1 Interoperability of intrinsic types
18.3.2 Interoperability with C pointer types
18.3.3 Interoperability of enum types
18.3.4 Interoperability of derived types and C structure types
18.3.5 Interoperability of scalar variables
18.3.6 Interoperability of array variables
18.3.7 Interoperability of procedures and procedure interfaces
18.4 C descriptors
18.5 The source file ISO_Fortran_binding.h
18.5.1 Summary of contents
18.5.2 The CFI_dim_t structure type
18.5.3 The CFI_cdesc_t structure type
18.5.4 Macros and typedefs in ISO_Fortran_binding.h
18.5.5 Functions declared in ISO_Fortran_binding.h
18.5.5.1 Arguments and results of the functions
18.5.5.2 The CFI_address function
18.5.5.3 The CFI_allocate function
18.5.5.4 The CFI_deallocate function
18.5.5.5 The CFI_establish function
18.5.5.6 The CFI_is_contiguous function
18.5.5.7 The CFI_section function
18.5.5.8 The CFI_select_part function
18.5.5.9 The CFI_setpointer function
18.6 Restrictions on C descriptors
18.7 Restrictions on formal parameters
18.8 Restrictions on lifetimes
18.9 Interoperation with C global variables
18.9.1 General
18.9.2 Binding labels for common blocks and variables
18.10 Interoperation with C functions
18.10.1 Definition and reference of interoperable procedures
18.10.2 Binding labels for procedures
18.10.3 Exceptions and IEEE arithmetic procedures
18.10.4 Asynchronous communication
19 Scope, association, and definition
19.1 Scopes, identifiers, and entities
19.2 Global identifiers
19.3 Local identifiers
19.3.1 Classes of local identifiers
19.3.2 Local identifiers that are the same as common block names
19.3.3 Function results
19.3.4 Components, type parameters, and bindings
19.3.5 Argument keywords
19.4 Statement and construct entities
19.5 Association
19.5.1 Name association
19.5.1.1 Forms of name association
19.5.1.2 Argument association
19.5.1.3 Use association
19.5.1.4 Host association
19.5.1.5 Linkage association
19.5.1.6 Construct association
19.5.2 Pointer association
19.5.2.1 General
19.5.2.2 Pointer association status
19.5.2.3 Events that cause pointers to become associated
19.5.2.4 Events that cause pointers to become disassociated
19.5.2.5 Events that cause the association status of pointers to become undefined
19.5.2.6 Other events that change the association status of pointers
19.5.2.7 Pointer definition status
19.5.3 Storage association
19.5.3.1 General
19.5.3.2 Storage sequence
19.5.3.3 Association of storage sequences
19.5.3.4 Association of scalar data objects
19.5.4 Inheritance association
19.5.5 Establishing associations
19.6 Definition and undefinition of variables
19.6.1 Definition of objects and subobjects
19.6.2 Variables that are always defined
19.6.3 Variables that are initially defined
19.6.4 Variables that are initially undefined
19.6.5 Events that cause variables to become defined
19.6.6 Events that cause variables to become undefined
19.6.7 Variable definition context
19.6.8 Pointer association context
Annex A
A.1 Unspecified items
A.2 Processor dependencies
Annex B
B.1 Deleted features from Fortran 90
B.2 Deleted features from Fortran 2008
B.3 Obsolescent features
B.3.1 General
B.3.2 Alternate return
B.3.3 Computed GO TO statement
B.3.4 Statement functions
B.3.5 DATA statements among executables
B.3.6 Assumed character length functions
B.3.7 Fixed form source
B.3.8 CHARACTER* form of CHARACTER declaration
B.3.9 ENTRY statements
B.3.10 Label DO statement
B.3.11 COMMON and EQUIVALENCE statements and the block data program unit
B.3.12 Specific names for intrinsic functions
B.3.13 FORALL construct and statement
Annex C
C.1 Features that were new in Fortran 2018
C.2 Fortran 2008 features not mentioned in its Introduction
C.3 Clause 7 notes
C.3.1 Selection of the approximation methods (7.4.3.2)
C.3.2 Type extension and component accessibility (7.5.2.2, 7.5.4)
C.3.3 Generic type-bound procedures (7.5.5)
C.3.4 Abstract types (7.5.7.1)
C.3.5 Structure constructors and generic names (7.5.10)
C.3.6 Final subroutines (7.5.6, 7.5.6.2, 7.5.6.3, 7.5.6.4)
C.4 Clause 8 notes: The VOLATILE attribute (8.5.20)
C.5 Clause 9 notes
C.5.1 Structure components (9.4.2)
C.5.2 Allocation with dynamic type (9.7.1)
C.6 Clause 10 notes
C.6.1 Evaluation of function references (10.1.7)
C.6.2 Pointers in expressions (10.1.9.2)
C.6.3 Pointers in variable definition contexts (10.2.1.3, 19.6.7)
C.7 Clause 11 notes
C.7.1 The SELECT CASE construct (11.1.9)
C.7.2 Loop control (11.1.7)
C.7.3 Examples of DO constructs (11.1.7) The following are all valid examples of DO constructs.
C.7.4 Examples of invalid DO constructs (11.1.7) The following are all examples of invalid skeleton DO constructs:
C.7.5 Simple example using events
C.7.6 Example using three teams
C.7.7 Accessing coarrays in sibling teams
C.7.8 Example involving failed images
C.7.9 EVENT_QUERY example that tolerates image failure
C.8 Clause 12 notes
C.8.1 External files (12.3)
C.8.1.1 File cataloging
C.8.1.2 File existence (12.3.2)
C.8.1.3 File access (12.3.3)
C.8.1.4 File connection (12.5)
C.8.1.5 File names (12.5.6.10)
C.8.2 Nonadvancing input/output (12.3.4.2)
C.8.3 OPEN statement (12.5.6)
C.8.4 Connection properties (12.5.4)
C.8.5 Asynchronous input/output (12.6.2.5)
C.9 Clause 13 notes
C.9.1 Number of records (13.4, 13.5, 13.8.2)
C.9.2 List-directed input (13.10.3)
C.10 Clause 14 notes
C.10.1 Main program and block data program unit (14.1, 14.3)
C.10.2 Dependent compilation (14.2)
C.10.2.1 Separate translation
C.10.2.2 USE statement and dependent compilation (14.2.2)
C.10.2.3 Accessibility attributes (8.5.2)
C.10.3 Examples of the use of modules (14.2.1)
C.10.3.1 Global data (14.2.1)
C.10.3.2 Derived types (14.2.1)
C.10.3.3 Global allocatable arrays (14.2.1)
C.10.3.4 Procedure libraries (14.2.2)
C.10.3.5 Operator extensions (14.2.2)
C.10.3.6 Data abstraction (14.2.2)
C.10.3.7 Public entities renamed (14.2.2)
C.10.4 Modules with submodules (14.2.3)
C.11 Clause 15 notes
C.11.1 Portability problems with external procedures (15.4.3.5)
C.11.2 Procedures defined by means other than Fortran (15.6.3)
C.11.3 Abstract interfaces and procedure pointer components (15.4, 7.5)
C.11.4 Pointers and targets as arguments (15.5.2.5, 15.5.2.7, 15.5.2.8)
C.11.5 Polymorphic Argument Association (15.5.2.10)
C.11.6 Rules ensuring unambiguous generics (15.4.3.4.5)
C.12 Clause 16 notes
C.12.1 Atomic memory consistency
C.12.1.1 Relaxed memory model
C.12.1.2 Examples with atomic operations
C.12.2 EVENT_QUERY example
C.12.3 Collective subroutine examples
C.13 Clause 18 notes
C.13.1 Runtime environments (18.1)
C.13.2 Example of Fortran calling C (18.3)
C.13.3 Example of C calling Fortran (18.3)
C.13.4 Example of calling C functions with noninteroperable data (18.10)
C.13.5 Example of opaque communication between C and Fortran (18.3)
C.13.6 Using assumed type to interoperate with C
C.13.6.1 Overview
C.13.6.2 Mapping of interfaces with void * C parameters to Fortran
C.13.7 Using assumed-type variables in Fortran
C.13.8 Simplifying interfaces for arbitrary rank procedures
C.13.9 Processing assumed-rank in C
C.13.10 Creating a contiguous copy of an array
C.13.11 Changing the attributes of an array
C.13.12 Creating an array section in C using CFI_section
C.13.13 Use of CFI_setpointer
C.13.14 Mapping of MPI interfaces to Fortran
C.14 Clause 19 notes
C.14.1 Examples of global identifiers and binding labels (19.2)
C.14.2 Examples of host association (19.5.1.4)

Cited references in this standard
Content history

[Superseded]

AS/NZS 1486:1993 Rec:2014

DR AS/NZS ISO/IEC 1539.1:2024

Please select a variation to view its description.

Published

17/05/2024

Pages

627

Please select a variation to view its pdf.

AS/NZS ISO/IEC 1539.1:2024
$425.04