Intel_Fortran_Compiler_Language_Reference [2003].pdf

(7949 KB) Pobierz
Intel ® Fortran
Language Reference
Copyright © 2003 Intel Corporation
Document Number: 253261-001
World Wide Web: http://developer.intel.com
895485515.023.png 895485515.024.png 895485515.025.png
 
895485515.001.png
 
895485515.002.png
 
895485515.003.png 895485515.004.png 895485515.005.png 895485515.006.png 895485515.007.png 895485515.008.png 895485515.009.png 895485515.010.png 895485515.011.png 895485515.012.png 895485515.013.png 895485515.014.png 895485515.015.png 895485515.016.png 895485515.017.png 895485515.018.png 895485515.019.png
Disclaimer and Legal Information
Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any
intellectual property rights is granted by this document. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE
FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR
IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES
RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPY-
RIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel products are not intended for use in medical, life saving, or life sustain-
ing applications.
This Reference as well as the software described in it is furnished under license and may only be used or copied in accordance with the
terms of the license. The information in this manual is furnished for informational use only, is subject to change without notice, and should
not be construed as a commitment by Intel Corporation. Intel Corporation assumes no responsibility or liability for any errors or inaccura-
cies that may appear in this document or any software that may be provided in association with this document.
Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves
these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
The software described in this Reference may contain software defects which may cause the product to deviate from published specifica-
tions. Current characterized software defects are available on request.
Intel SpeedStep, Intel Thread Checker, Celeron, Dialogic, i386, i486, iCOMP, Intel, Intel logo, Intel386, Intel486, Intel740, IntelDX2,
IntelDX4, IntelSX2, Intel Inside, Intel Inside logo, Intel NetBurst, Intel NetStructure, Intel Xeon, Intel XScale, Itanium, MMX, MMX logo,
Pentium, Pentium II Xeon, Pentium III Xeon, Pentium M, and VTune are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.
Copyright © 2003 Intel Corporation.
Portions © Copyright 2001 Hewlett-Packard Development Company, L.P.
ii
Contents
About This Manual
Product Website and Support .................................................................. xxvi
Related Publications................................................................................. xxvii
Conventions ............................................................................................. xxix
Platform Labels.................................................................................... xxxi
Chapter 1
Overview
Language Standards Conformance .......................................................... 1-2
Language Compatibility............................................................................. 1-2
Fortran 2003 Features............................................................................... 1-2
Improved Features................................................................................ 1-3
Fortran 95 Features................................................................................... 1-3
New Features ....................................................................................... 1-3
Improved Features................................................................................ 1-4
Fortran 90 Features................................................................................... 1-5
New Features ....................................................................................... 1-5
Improved Features................................................................................ 1-7
Chapter 2
Program Structure, Characters, and Source Forms
Program Structure ..................................................................................... 2-1
Statements ........................................................................................... 2-2
Names .................................................................................................. 2-4
Character Sets .......................................................................................... 2-5
Source Forms............................................................................................ 2-6
Free Source Form................................................................................. 2-9
iii
895485515.020.png
 
Intel Fortran Language Reference
Fixed and Tab Source Forms .............................................................. 2-11
Fixed-Format Lines ........................................................................ 2-13
Tab-Format Lines ........................................................................... 2-13
Source Code Useable for All Source Forms ....................................... 2-15
Chapter 3
Data Types, Constants, and Variables
Intrinsic Data Types ................................................................................... 3-2
Integer Data Types................................................................................ 3-4
Real Data Types.................................................................................... 3-6
General Rules for Real Constants.................................................... 3-7
REAL(4) Constants .......................................................................... 3-8
REAL(8) or DOUBLE PRECISION Constants ................................. 3-9
REAL(16) Constants ...................................................................... 3-10
Complex Data Types........................................................................... 3-10
General Rules for Complex Constants........................................... 3-11
COMPLEX(4) Constants ................................................................ 3-11
COMPLEX(8) or DOUBLE COMPLEX Constants ......................... 3-12
COMPLEX(16) Constants .............................................................. 3-13
Logical Data Types.............................................................................. 3-14
Character Data Type ........................................................................... 3-14
C Strings in Character Constants................................................... 3-16
Character Substrings .................................................................... 3-17
Derived Data Types ................................................................................. 3-19
Derived-Type Definition....................................................................... 3-20
Default Initialization............................................................................. 3-22
Structure Components........................................................................ 3-23
Structure Constructors........................................................................ 3-26
Binary, Octal, Hexadecimal, and Hollerith Constants .............................. 3-28
Binary Constants ................................................................................ 3-28
Octal Constants .................................................................................. 3-29
Hexadecimal Constants ...................................................................... 3-29
Hollerith Constants ............................................................................. 3-30
Determining the Data Type of Nondecimal Constants ........................ 3-31
Variables .................................................................................................. 3-33
iv
895485515.021.png
 
Contents
Data Types of Scalar Variables ........................................................... 3-34
Specification of Data Type .............................................................. 3-34
Implicit Typing Rules....................................................................... 3-35
Arrays .................................................................................................. 3-35
Whole Arrays .................................................................................. 3-38
Array Elements ............................................................................... 3-38
Array Sections ................................................................................ 3-41
Array Constructors.......................................................................... 3-44
Chapter 4
Expressions and Assignment Statements
Expressions ............................................................................................... 4-1
Numeric Expressions ............................................................................ 4-2
Using Parentheses in Numeric Expressions .................................... 4-4
Data Type of Numeric Expressions .................................................. 4-5
Character Expressions.......................................................................... 4-6
Relational Expressions.......................................................................... 4-7
Logical Expressions .............................................................................. 4-8
Data Types Resulting from Logical Operations ................................ 4-9
Evaluation of Logical Expressions.................................................... 4-9
Defined Operations ............................................................................. 4-10
Summary of Operator Precedence ..................................................... 4-11
Initialization and Specification Expressions ........................................ 4-11
Initialization Expressions ................................................................ 4-12
Specification Expressions .............................................................. 4-13
Assignment Statements ........................................................................... 4-15
Intrinsic Assignments .......................................................................... 4-16
Numeric Assignment Statements ................................................... 4-17
Logical Assignment Statements ..................................................... 4-18
Character Assignment Statements................................................. 4-18
Derived-Type Assignment Statements ........................................... 4-19
Array Assignment Statements ........................................................ 4-20
Defined Assignments .......................................................................... 4-21
Pointer Assignments ........................................................................... 4-22
WHERE Statement and Construct ...................................................... 4-23
v
895485515.022.png
 
Zgłoś jeśli naruszono regulamin