NAG Fortran Compiler, Release 7.2
NAG® Fortran Compiler
© 2024 The Numerical Algorithms Group Limited
All rights reserved. No part of this Manual may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except for the purpose of using the NAG Fortran Compiler.
The copyright owner gives no warranties and makes no representations about the contents of this Manual and specifically disclaims any implied warranties of merchantability or fitness for any purpose.
The copyright owner reserves the right to revise this Manual and to make changes from time to time in its contents without notifying any person of such revisions or changes.
12th Edition – January 2024
NAG is a registered trademark of:
The Numerical Algorithms Group Limited
The Numerical Algorithms Group Inc
Nihon Numerical Algorithms Group KK
NAG Ltd | Nihon NAG KK |
30 St Giles' | Hatchobori Frontier Building 2F |
OXFORD | 4-9-9 |
OX1 3LE | Hatchobori |
United Kingdom | Chuo-ku |
Tel: +44 (0)1865 511245 (general) | Tokyo |
Tel: +44 (0)1865 311744 (support) | 104-0032 |
Web: www.nag.com | Japan |
Tel: +81 (0)3 5542 6311 | |
Fax: +81 (0)3 5542 6312 | |
Web: www.nag-j.co.jp | |
| |
NAG Inc | |
801 Warrenville Road, Suite 185 | |
Lisle, IL 60532-4332 | |
USA | |
Tel: +1 630 971 2337 | |
Fax: +1 630 971 2706 | |
Web: www.nag.com |
NAG also has a number of distributors throughout the world. Please contact NAG for further details.
- 1 Introduction
-
2 Using the Compiler
- 2.1 Usage
- 2.2 Description
- 2.3 File Types
- 2.4 Compiler Options
- 2.5 Files
- 2.6 Compilation Messages
- 2.7 Compiler Limits
- 2.8 Input/Output Information
- 2.9 OpenMP Support
- 2.10 Automatic File Preconnection
- 2.11 IEEE 754 Arithmetic Support
- 2.12 Half precision floating-point
- 2.13 Random Number Algorithm
- 2.14 Automatic Garbage Collection
- 2.15 Memory Tracing
- 2.16 Undefined Variable Detection
- 2.17 Data Types
- 2.18 Modules
- 2.19 Runtime Environment Variables
- 2.20 Debugging
- 2.21 Producing a Call Graph
- 2.22 Dependency Analysis
- 2.23 Generating Interfaces
- 2.24 Source File Polishing
- 2.25 Enhanced Source File Polishing
- 2.26 Unifying Precision
- 3 Debugging with dbx90
- 4 Preprocessing with fpp
-
5 Extensions
- 5.1 Non-standard Extensions
-
5.2 Obsolete Extensions
- 5.2.1 Byte Sizes
- 5.2.2 TAB Format
- 5.2.3 Hollerith Constants
- 5.2.4 D (debug) lines in Fixed Source Form
- 5.2.5 Increased Line Length in Fixed Source Form
- 5.2.6 Increased Maximum Number of Continuation Lines
- 5.2.7 Intrinsic functions with mixed-kind arguments
-
5.2.8
ACCESS='APPEND'
specifier onOPEN
statement -
5.2.9 VAX FORTRAN
TYPE
statement -
5.2.10 Auto-skipping
NAMELIST
input - 5.2.11 Legacy Application Support
- 5.2.12 Mismatched Argument Lists
- 5.2.13 Double Precision Complex Extensions
- 6 Intrinsic Modules
- 7 Modern Fortran API to Posix
- 8 Standard Fortran 95
-
9 Fortran 2003 Extensions
- 9.1 Fortran 2003 Overview
- 9.2 Object-oriented programming
- 9.3 ALLOCATABLE extensions
- 9.4 Other data-oriented enhancements
- 9.5 C interoperability [mostly 5.1]
- 9.6 IEEE arithmetic support [4.x except as otherwise noted]
-
9.7 Input/output Features
- 9.7.1 Stream input/output [5.1]
- 9.7.2 The BLANK= and PAD= specifiers [5.1]
- 9.7.3 Decimal Comma [5.1]
- 9.7.4 The DELIM= specifier [5.1]
- 9.7.5 The ENCODING= specifier [5.1]
- 9.7.6 The IOMSG= specifier [5.1]
- 9.7.7 The IOSTAT= specifier [5.1]
- 9.7.8 The SIGN= specifier [5.1]
- 9.7.9 Intrinsic functions for testing IOSTAT= values [5.1]
- 9.7.10 Input/output of IEEE infinities and NaNs [5.1]
- 9.7.11 Output of floating-point zero [5.1]
- 9.7.12 NAMELIST and internal files [5.1]
- 9.7.13 Variables permitted in NAMELIST
- 9.7.14 Recursive input/output [5.2]
- 9.7.15 Asynchronous input/output
- 9.7.16 Scale factor followed by repeat count [5.1]
- 9.7.17 FLUSH statement [5.2]
- 9.7.18 Defined input/output [6.2]
-
9.8 Miscellaneous Fortran 2003 Features
- 9.8.1 Abstract interfaces and the PROCEDURE statement [5.1]
- 9.8.2 Named procedure pointers [5.2]
- 9.8.3 Intrinsic modules [4.x]
- 9.8.4 Renaming user-defined operators on the USE statement [5.2]
- 9.8.5 The ISO_FORTRAN_ENV module [5.1]
- 9.8.6 The IMPORT statement [5.1]
- 9.8.7 Length of names and statements
- 9.8.8 Array constructor syntax enhancements
- 9.8.9 Structure constructor syntax enhancements [5.3]
- 9.8.10 Deferred character length [5.2]
- 9.8.11 The ERRMSG= specifier [5.1]
- 9.8.12 Intrinsic functions in constant expressions [5.2 partial; 5.3 complete]
- 9.8.13 Specification functions can be recursive [6.2]
- 9.8.14 Access to the command line [5.1]
- 9.8.15 Access to environment variables [5.1]
- 9.8.16 Character kind selection [5.1]
- 9.8.17 Argument passing relaxation [5.1]
- 9.8.18 The MAXLOC and MINLOC intrinsic functions [5.1]
- 9.8.19 The VALUE attribute [4.x]
- 9.8.20 The VOLATILE attribute [5.0]
- 9.8.21 Enhanced complex constants [5.2]
-
9.8.22 The
ASSOCIATE
construct [5.2] - 9.8.23 Binary, octal and hexadecimal constants [5.2]
- 9.8.24 Character sets [5.1; 5.3]
- 9.8.25 Intrinsic function changes for 64-bit machines [5.2]
- 9.8.26 Miscellaneous intrinsic procedure changes [5.2]
-
10 Fortran 2008 Extensions
- 10.1 Fortran 2008 Overview
-
10.2 SPMD programming with coarrays [6.2, 7.0]
- 10.2.1 Overview
- 10.2.2 Images
- 10.2.3 Coarrays
- 10.2.4 Declaring coarrays
- 10.2.5 Accessing coarrays on other images
- 10.2.6 Segments and synchronisation
- 10.2.7 Allocating and deallocating coarrays
- 10.2.8 Critical constructs
- 10.2.9 Lock variables
- 10.2.10 Atomic coarray accessing
- 10.2.11 Normal termination of execution
- 10.2.12 Error termination
- 10.2.13 Fault tolerance
- 10.2.14 Detailed syntax of coarray features
- 10.2.15 Intrinsic procedures and coarrays
- 10.3 Data declaration [mostly 6.0]
- 10.4 Data usage and computation [mostly 5.3]
- 10.5 Execution control [mostly 6.0]
-
10.6 Intrinsic procedures and modules
- 10.6.1 Additional mathematical intrinsic functions [mostly 5.3.1]
- 10.6.2 Additional intrinsic functions for bit manipulation [mostly 5.3]
- 10.6.3 Other new intrinsic procedures [mostly 5.3.1]
- 10.6.4 Changes to existing intrinsic procedures [mostly 5.3.1]
-
10.6.5
ISO_C_BINDING
additions [6.2] -
10.6.6
ISO_FORTRAN_ENV
additions
- 10.7 Input/output extensions [mostly 5.3]
- 10.8 Programs and procedures [mostly 5.3]
-
11 Fortran 2018 Extensions
- 11.1 Fortran 2018 Overview
- 11.2 Data declaration
- 11.3 Data usage and computation
- 11.4 Input/output
- 11.5 Execution control
- 11.6 Intrinsic procedures and modules
- 11.7 Program units and procedures
- 11.8 Advanced C interoperability
- 11.9 Updated IEEE arithmetic capabilities
- 11.10 Advanced coarray programming
- 12 Appendices
-
13 Detailed Contents