intel fortran programmer s fortran programmer’s reference

Download Intel  Fortran Programmer s   Fortran Programmer’s Reference

Post on 19-Mar-2018

242 views

Category:

Documents

10 download

Embed Size (px)

TRANSCRIPT

  • Intel Fortran ProgrammersReference

    Copyright 1996-2003 Intel CorporationAll Rights ReservedIssued in U.S.A.Version Number: FWL-710-02

    World Wide Web: http://developer.intel.com

    http://developer.intel.com

  • Information in this document is provided in connection with Intel products. No license, express or implied, by estoppelor otherwise, to any intellectual property rights is granted by this document. EXCEPT AS PROVIDED IN INTELSTERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSO-EVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/ORUSE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PAR-TICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHERINTELLECTUAL PROPERTY RIGHT. Intel products are not intended for use in medical, life saving, or life sustainingapplications.

    This Intel Fortran Programmers Reference as well as the software described in it is furnished under license and mayonly be used or copied in accordance with the terms of the license. The information in this manual is furnished for infor-mational use only, is subject to change without notice, and should not be construed as a commitment by Intel Corpora-tion. Intel Corporation assumes no responsibility or liability for any errors or inaccuracies that may appear in thisdocument 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 "unde-fined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibil-ities arising from future changes to them.

    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 Centrino, Intel XScale, Itanium, MMX, MMX logo, Pentium, Pentium II Xeon, Pentium III Xeon, Intel Pentium M,and VTune are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and othercountries.

    * Other names and brands may be claimed as the property of others.

    Copyright Intel Corporation 1996 - 2003.

  • v

    ContentsAbout This Manual

    Related Publications............................................................. xxivNotational Conventions.......................................................... xxv

    Chapter 1 Introduction to Intel Fortran CompilerNew Features in Fortran 95 .................................................. 1-2

    Source Format .................................................................. 1-2Data Types........................................................................ 1-2Operators .......................................................................... 1-3Control Constructs ............................................................ 1-3Arrays................................................................................ 1-3Procedures........................................................................ 1-4Pointers............................................................................. 1-5Modules ............................................................................ 1-5Non-advancing I/O ............................................................ 1-5Namelist I/O ...................................................................... 1-6

    Chapter 2 Language ElementsCharacter Set ........................................................................ 2-1Lexical Tokens ....................................................................... 2-2Names ................................................................................... 2-2Program Structure ................................................................. 2-3Statement Labels ................................................................... 2-3

  • vi

    Intel Fortran Programmers Reference

    Construct Names ................................................................... 2-4Statements............................................................................. 2-4

    Statement Order................................................................ 2-6Source Program Forms ......................................................... 2-8

    Fixed Source Form ........................................................... 2-8Initial Line ..................................................................... 2-9Continuation Line ......................................................... 2-9Comment Line............................................................ 2-10Tab-format Lines ........................................................ 2-10

    Free Source Form........................................................... 2-10Source Lines .............................................................. 2-10Statement Labels........................................................ 2-11Spaces ....................................................................... 2-11Examples Using Spaces ............................................ 2-11Comments .................................................................. 2-12Statement Continuation .............................................. 2-12Example of Statement Continuation ........................... 2-13

    Intersection Source Form................................................ 2-13INCLUDE Line ..................................................................... 2-14

    Example of INCLUDE Lines....................................... 2-15

    Chapter 3 Data Types and Data ObjectsTerminology ........................................................................... 3-1Intrinsic Data Types ............................................................... 3-2Derived Types........................................................................ 3-4Type Declarations .................................................................. 3-5

    Examples of Type Declarations ........................................ 3-7Alternative Form of Intrinsic Type Spec Declaration ......... 3-8

    Alternative Form of Initialization Within Declaration ..... 3-9Increasing Default Sizes .............................................. 3-9

    Intrinsic Inquiry Functions ................................................. 3-9Attributes......................................................................... 3-10

  • Contents

    vii

    Representation of Literal Constants ..................................... 3-11Integer Constants ............................................................ 3-11

    BOZ Constants .......................................................... 3-12Real Constants ............................................................... 3-13Complex Constants ........................................................ 3-14Character Constants....................................................... 3-14Logical Constants ........................................................... 3-16Typeless Constants ........................................................ 3-16

    Extended Use of BOZ Constants............................... 3-17Hollerith Constants .................................................... 3-18

    Character Substrings .......................................................... 3-19Derived-type Definition........................................................ 3-20

    Structure Constructor ..................................................... 3-22Implicit and Explicit Typing .................................................. 3-22

    IMPLICIT Statement .................................................. 3-23Data Initialization................................................................. 3-24Storage Association and Alignment .................................... 3-25

    Storage Association Alignment Rule .............................. 3-25Dynamic Data Objects......................................................... 3-26

    Allocatable Arrays........................................................... 3-27Pointers .......................................................................... 3-27

    CRAY*-Style Pointers ................................................ 3-27Automatic Objects .......................................................... 3-28

    Records and Structures....................................................... 3-28

    Chapter 4 ArraysNew Features........................................................................ 4-1Array Properties .................................................................... 4-3Array Declaration .................................................................. 4-4

    Syntax............................................................................... 4-5Examples of Array Specifiers ........................................... 4-5Array Element Storage Order ........................................... 4-6

  • viii

    Intel Fortran Programmers Reference

    Array Categories.................................................................... 4-7Explicit-shape Arrays ........................................................ 4-7Assumed-shape Arrays..................................................... 4-9Deferred-shape Arrays.................................................... 4-12

    Pointer Arrays ............................................................ 4-12Allocatable Arrays ...................................................... 4-13

    Assumed-size Arrays ...................................................... 4-15Whole Arrays and Array Subobjects.................................... 4-16

    Array Elements ................................................

Recommended

View more >