XL Fortran for AIX 8.1

Language Reference


Contents

  • Summary of Changes for XL Fortran
  • OpenMP Fortran API, Version 2.0 Features
  • Fortran 95 Features
  • Summary of Changes for the XL Fortran Language
  • Highlighting Conventions
  • How to Use This Book
  • Highlighting Conventions
  • How to Read Syntax Diagrams
  • Syntax Diagrams
  • Example of a Syntax Diagram
  • Notes on the Examples in This Book
  • Related Documentation
  • Standards Documents

  • Part 1. Introduction

  • Chapter 1. Introduction to XL Fortran for AIX
  • XL Fortran (XLF)
  • What is OpenMP?
  • Compiler Directives
  • Library Routines
  • Environment Variables
  • What is Fortran 95?
  • FORALL
  • PURE
  • ELEMENTAL
  • Initialization
  • Specification Functions
  • Deleted Features
  • What is Fortran 90?
  • Fortran 90 Free Source Form
  • Parameterized Data Types
  • Derived Types
  • Array Enhancements
  • Pointers
  • Dynamic Behavior
  • Control Construct Enhancements
  • Procedure Enhancements
  • Modules
  • New Intrinsic Procedures
  • Valid and Invalid XL Fortran Programs

  • Part 2. Concepts and Elements

  • Chapter 2. The Language Elements
  • Characters
  • Names
  • Statements
  • Statement Keywords
  • Statement Labels
  • Lines and Source Formats
  • Fixed Source Form
  • Free Source Form
  • IBM Free Source Form
  • Conditional Compilation
  • Order of Statements and Execution Sequence
  • Chapter 3. Data Types and Data Objects
  • Data Types
  • Type Parameters and Specifiers
  • Data Objects
  • Constants
  • Automatic Objects
  • Intrinsic Types
  • Integer
  • Real
  • Complex
  • Logical
  • Character
  • BYTE
  • Derived Types
  • Input/Output
  • Determining Type for Derived Types
  • Record Structures
  • Union and Map
  • Typeless Literal Constants
  • Hexadecimal Constants
  • Octal Constants
  • Binary Constants
  • Hollerith Constants
  • Using Typeless Constants
  • How Type Is Determined
  • Definition Status of Variables
  • Events Causing Definition
  • Events Causing Undefinition
  • Allocation Status
  • Storage Classes for Variables
  • Fundamental Storage Classes
  • Secondary Storage Classes
  • Storage Class Assignment
  • Chapter 4. Array Concepts
  • Arrays
  • Bounds of a Dimension
  • Extent of a Dimension
  • Rank, Shape, and Size of an Array
  • Array Declarators
  • Explicit-Shape Arrays
  • Examples of Explicit-Shape Arrays
  • Automatic Arrays
  • Adjustable Arrays
  • Pointee Arrays
  • Assumed-Shape Arrays
  • Examples of Assumed-Shape Arrays
  • Deferred-Shape Arrays
  • Allocatable Arrays
  • Array Pointers
  • Assumed-Size Arrays
  • Examples of Assumed-Size Arrays
  • Array Elements
  • Notes
  • Array Element Order
  • Array Sections
  • Subscript Triplets
  • Vector Subscripts
  • Array Sections and Substring Ranges
  • Array Sections and Structure Components
  • Rank and Shape of Array Sections
  • Array Constructors
  • Implied-DO List for an Array Constructor
  • Expressions Involving Arrays
  • Chapter 5. Expressions and Assignment
  • Introduction to Expressions and Assignment
  • Primary
  • Constant Expressions
  • Examples of Constant Expressions
  • Initialization Expressions
  • Examples of Initialization Expressions
  • Specification Expressions
  • Examples of Specification Expressions
  • Operators and Expressions
  • General
  • Arithmetic
  • Character
  • Relational
  • Logical
  • Primary
  • Extended Intrinsic and Defined Operations
  • How Expressions Are Evaluated
  • Precedence of Operators
  • Using BYTE Data Objects
  • Intrinsic Assignment
  • Arithmetic Conversion
  • WHERE Construct
  • Interpreting Masked Array Assignments
  • FORALL Construct
  • Interpreting the FORALL Construct
  • Pointer Assignment
  • Examples of Pointer Assignment
  • Integer Pointer Assignment
  • Chapter 6. Control
  • Statement Blocks
  • IF Construct
  • Example
  • CASE Construct
  • Examples
  • DO Construct
  • The Terminal Statement
  • DO WHILE Construct
  • Example
  • Branching
  • Chapter 7. Program Units and Procedures
  • Scope
  • The Scope of a Name
  • Association
  • Host Association
  • Use Association
  • Pointer Association
  • Integer Pointer Association
  • Program Units, Procedures, and Subprograms
  • Internal Procedures
  • Interface Concepts
  • Interface Blocks
  • Example of an Interface
  • Generic Interface Blocks
  • Unambiguous Generic Procedure References
  • Extending Intrinsic Procedures with Generic Interface Blocks
  • Defined Operators
  • Defined Assignment
  • Main Program
  • Modules
  • Example of a Module
  • Block Data Program Unit
  • Example of a Block Data Program Unit
  • Function and Subroutine Subprograms
  • Procedure References
  • Intrinsic Procedures
  • Conflicts Between Intrinsic Procedure Names and Other Names
  • Arguments
  • Actual Argument Specification
  • Argument Association
  • %VAL and %REF
  • Intent of Dummy Arguments
  • Optional Dummy Arguments
  • Restrictions on Optional Dummy Arguments Not Present
  • Length of Character Arguments
  • Variables as Dummy Arguments
  • Allocatable Objects as Dummy Arguments
  • Pointers as Dummy Arguments
  • Procedures as Dummy Arguments
  • Asterisks as Dummy Arguments
  • Resolution of Procedure References
  • Rules for Resolving Procedure References to Names
  • Resolving Procedure References to Generic Names
  • Recursion
  • Pure Procedures
  • Examples
  • Elemental Procedures
  • Examples
  • Chapter 8. Input/Output Concepts
  • Records
  • Formatted Records
  • Unformatted Records
  • Endfile Records
  • Files
  • External Files
  • External File Access Modes: Sequential or Direct
  • Internal Files
  • Units
  • Connection of a Unit
  • Executing Data Transfer Statements
  • Executing Data Transfer Statements Asynchronously
  • Advancing and Nonadvancing Input/Output
  • File Position Before and After Data Transfer
  • Conditions and IOSTAT Values
  • End-Of-Record Conditions
  • End-Of-File Conditions
  • Error Conditions
  • Chapter 9. Input/Output Formatting
  • Format-Directed Formatting
  • Data Edit Descriptors
  • Control Edit Descriptors
  • Character String Edit Descriptors
  • Editing
  • Complex Editing
  • Data Edit Descriptors
  • A (Character) Editing
  • B (Binary) Editing
  • E, D, and Q (Extended Precision) Editing
  • EN Editing
  • ES Editing
  • F (Real without Exponent) Editing
  • G (General) Editing
  • I (Integer) Editing
  • L (Logical) Editing
  • O (Octal) Editing
  • Q (Character Count) Editing
  • Z (Hexadecimal) Editing
  • Control Edit Descriptors
  • / (Slash) Editing
  • : (Colon) Editing
  • $ (Dollar) Editing
  • Apostrophe/Double Quotation Mark Editing (Character-String Edit Descriptor)
  • BN (Blank Null) and BZ (Blank Zero) Editing
  • H Editing
  • P (Scale Factor) Editing
  • S, SP, and SS (Sign Control) Editing
  • T, TL, TR, and X (Positional) Editing
  • Interaction between Input/Output Lists and Format Specifications
  • List-Directed Formatting
  • List-Directed Input
  • List-Directed Output
  • Namelist Formatting
  • Namelist Input Data
  • Namelist Output Data

  • Part 3. Statements and Directives

  • Chapter 10. Statements
  • Attributes
  • ALLOCATABLE
  • ALLOCATE
  • ASSIGN
  • AUTOMATIC
  • BACKSPACE
  • BLOCK DATA
  • BYTE
  • CALL
  • CASE
  • CHARACTER
  • CLOSE
  • COMMON
  • COMPLEX
  • CONTAINS
  • CONTINUE
  • CYCLE
  • DATA
  • DEALLOCATE
  • Derived Type
  • DIMENSION
  • DO
  • DO WHILE
  • DOUBLE COMPLEX
  • DOUBLE PRECISION
  • ELSE
  • ELSE IF
  • ELSEWHERE
  • END
  • END (Construct)
  • END INTERFACE
  • END TYPE
  • ENDFILE
  • ENTRY
  • EQUIVALENCE
  • EXIT
  • EXTERNAL
  • FORALL
  • FORALL (Construct)
  • FORMAT
  • FUNCTION
  • GO TO (Assigned)
  • GO TO (Computed)
  • GO TO (Unconditional)
  • IF (Arithmetic)
  • IF (Block)
  • IF (Logical)
  • IMPLICIT
  • INQUIRE
  • INTEGER
  • INTENT
  • INTERFACE
  • INTRINSIC
  • LOGICAL
  • MODULE
  • MODULE PROCEDURE
  • NAMELIST
  • NULLIFY
  • OPEN
  • OPTIONAL
  • PARAMETER
  • PAUSE
  • POINTER (Fortran 90)
  • POINTER (integer)
  • PRINT
  • PRIVATE
  • PROGRAM
  • PUBLIC
  • READ
  • REAL
  • RECORD
  • RETURN
  • REWIND
  • SAVE
  • SELECT CASE
  • SEQUENCE
  • Statement Function
  • STATIC
  • STOP
  • SUBROUTINE
  • TARGET
  • TYPE
  • Type Declaration
  • USE
  • VIRTUAL
  • VOLATILE
  • WAIT
  • WHERE
  • WRITE
  • Chapter 11. Directives
  • SMP and Thread-Safing Directives
  • Noncomment and Comment Form Directives
  • Noncomment Form Directives
  • Comment Form Directives
  • Clauses for SMP and Thead-Safing Directives
  • Format
  • Rules
  • Examples
  • List of Data Scope Attribute Clauses
  • Detailed Descriptions of Compiler Directives
  • ASSERT
  • ATOMIC
  • BARRIER
  • CACHE_ZERO
  • CNCALL
  • COLLAPSE
  • CRITICAL / END CRITICAL
  • DO / END DO
  • DO SERIAL
  • EJECT
  • FLUSH
  • INCLUDE
  • ISYNC
  • LIGHT_SYNC
  • INDEPENDENT
  • #line
  • MASTER / END MASTER
  • ORDERED / END ORDERED
  • PARALLEL / END PARALLEL
  • PARALLEL DO / END PARALLEL DO
  • PARALLEL SECTIONS / END PARALLEL SECTIONS
  • PARALLEL WORKSHARE / END PARALLEL WORKSHARE
  • PERMUTATION
  • PREFETCH
  • @PROCESS
  • SCHEDULE
  • SECTIONS / END SECTIONS
  • SINGLE / END SINGLE
  • SNAPSHOT
  • SOURCEFORM
  • SUBSCRIPTORDER
  • THREADLOCAL
  • THREADPRIVATE
  • UNROLL
  • WORKSHARE

  • Part 4. Intrinsic and Library Procedures

  • Chapter 12. Intrinsic Procedures
  • Classes of Intrinsic Procedures
  • Inquiry Intrinsic Functions
  • Elemental Intrinsic Procedures
  • System Inquiry Intrinsic Functions
  • Transformational Intrinsic Functions
  • Intrinsic Subroutines
  • Data Representation Models
  • Integer Bit Model
  • Integer Data Model
  • Real Data Model
  • Detailed Descriptions of Intrinsic Procedures
  • ABORT()
  • ABS(A)
  • ACHAR(I)
  • ACOS(X)
  • ACOSD(X)
  • ADJUSTL(STRING)
  • ADJUSTR(STRING)
  • AIMAG(Z), IMAG(Z)
  • AINT(A, KIND)
  • ALL(MASK, DIM)
  • ALLOCATED(ARRAY) or ALLOCATED(SCALAR)
  • ANINT(A, KIND)
  • ANY(MASK, DIM)
  • ASIN(X)
  • ASIND(X)
  • ASSOCIATED(POINTER, TARGET)
  • ATAN(X)
  • ATAND(X)
  • ATAN2(Y, X)
  • ATAN2D(Y, X)
  • BIT_SIZE(I)
  • BTEST(I, POS)
  • CEILING(A, KIND)
  • CHAR(I, KIND)
  • CMPLX(X, Y, KIND)
  • CONJG(Z)
  • COS(X)
  • COSD(X)
  • COSH(X)
  • COUNT(MASK, DIM)
  • CPU_TIME(TIME)
  • CSHIFT(ARRAY, SHIFT, DIM)
  • CVMGx(TSOURCE, FSOURCE, MASK)
  • DATE_AND_TIME(DATE, TIME, ZONE, VALUES)
  • DBLE(A)
  • DCMPLX(X, Y)
  • DIGITS(X)
  • DIM(X, Y)
  • DOT_PRODUCT(VECTOR_A, VECTOR_B)
  • DPROD(X, Y)
  • EOSHIFT(ARRAY, SHIFT, BOUNDARY, DIM)
  • EPSILON(X)
  • ERF(X)
  • ERFC(X)
  • EXP(X)
  • EXPONENT(X)
  • FLOOR(A, KIND)
  • FRACTION(X)
  • GAMMA(X)
  • GETENV(NAME, VALUE)
  • HFIX(A)
  • HUGE(X)
  • IACHAR(C)
  • IAND(I, J)
  • IBCLR(I, POS)
  • IBITS(I, POS, LEN)
  • IBSET(I, POS)
  • ICHAR(C)
  • IEOR(I, J)
  • ILEN(I)
  • IMAG(Z)
  • INDEX(STRING, SUBSTRING, BACK)
  • INT(A, KIND)
  • INT2(A)
  • IOR(I, J)
  • ISHFT(I, SHIFT)
  • ISHFTC(I, SHIFT, SIZE)
  • KIND(X)
  • LBOUND(ARRAY, DIM)
  • LEADZ(I)
  • LEN(STRING)
  • LEN_TRIM(STRING)
  • LGAMMA(X)
  • LGE(STRING_A, STRING_B)
  • LGT(STRING_A, STRING_B)
  • LLE(STRING_A, STRING_B)
  • LLT(STRING_A, STRING_B)
  • LOC(X)
  • LOG(X)
  • LOG10(X)
  • LOGICAL(L, KIND)
  • LSHIFT(I, SHIFT)
  • MATMUL(MATRIX_A, MATRIX_B, MINDIM)
  • MAX(A1, A2, A3, ...)
  • MAXEXPONENT(X)
  • MAXLOC(ARRAY, DIM, MASK) or MAXLOC(ARRAY, MASK)
  • MAXVAL(ARRAY, DIM, MASK) or MAXVAL(ARRAY, MASK)
  • MERGE(TSOURCE, FSOURCE, MASK)
  • MIN(A1, A2, A3, ...)
  • MINEXPONENT(X)
  • MINLOC(ARRAY, DIM, MASK) or MINLOC(ARRAY, MASK)
  • MINVAL(ARRAY, DIM, MASK) or MINVAL(ARRAY, MASK)
  • MOD(A, P)
  • MODULO(A, P)
  • MVBITS(FROM, FROMPOS, LEN, TO, TOPOS)
  • NEAREST(X,S)
  • NINT(A, KIND)
  • NOT(I)
  • NULL(MOLD)
  • NUM_PARTHDS()
  • NUMBER_OF_PROCESSORS(DIM)
  • NUM_USRTHDS()
  • PACK(ARRAY, MASK, VECTOR)
  • PRECISION(X)
  • PRESENT(A)
  • PROCESSORS_SHAPE()
  • PRODUCT(ARRAY, DIM, MASK) or PRODUCT(ARRAY, MASK)
  • QCMPLX(X, Y)
  • QEXT(A)
  • RADIX(X)
  • RAND()
  • RANDOM_NUMBER(HARVEST)
  • RANDOM_SEED(SIZE, PUT, GET, GENERATOR)
  • RANGE(X)
  • REAL(A, KIND)
  • REPEAT(STRING, NCOPIES)
  • RESHAPE(SOURCE, SHAPE, PAD, ORDER)
  • RRSPACING(X)
  • RSHIFT(I, SHIFT)
  • SCALE(X,I)
  • SCAN(STRING, SET, BACK)
  • SELECTED_INT_KIND(R)
  • SELECTED_REAL_KIND(P, R)
  • SET_EXPONENT(X,I)
  • SHAPE(SOURCE)
  • SIGN(A, B)
  • SIGNAL(I, PROC)
  • SIN(X)
  • SIND(X)
  • SINH(X)
  • SIZE(ARRAY, DIM)
  • SIZEOF(A)
  • SPACING(X)
  • SPREAD(SOURCE, DIM, NCOPIES)
  • SQRT(X)
  • SRAND(SEED)
  • SUM(ARRAY, DIM, MASK) or SUM(ARRAY, MASK)
  • SYSTEM(CMD, RESULT)
  • SYSTEM_CLOCK(COUNT, COUNT_RATE, COUNT_MAX)
  • TAN(X)
  • TAND(X)
  • TANH(X)
  • TINY(X)
  • TRANSFER(SOURCE, MOLD, SIZE)
  • TRANSPOSE(MATRIX)
  • TRIM(STRING)
  • UBOUND(ARRAY, DIM)
  • UNPACK(VECTOR, MASK, FIELD)
  • VERIFY(STRING, SET, BACK)
  • Chapter 13. PowerPC Intrinsic Procedures
  • FCFI(I)
  • FCTID(X)
  • FCTIDZ(X)
  • FCTIW(X)
  • FCTIWZ(X)
  • FMADD(A, X, Y)
  • FMSUB(A, X, Y)
  • FNABS(X)
  • FNMADD(A, X, Y)
  • FNMSUB(A, X, Y)
  • FRE(X)
  • FRSQRTE(X)
  • FSEL(X,Y,Z)
  • MTFSF(MASK, R)
  • MTFSFI(BF, I)
  • MULHY(RA, RB)
  • ROTATELI(RS, IS, SHIFT, MASK)
  • ROTATELM(RS, SHIFT, MASK)
  • SETFSB0(BT)
  • SETFSB1(BT)
  • SFTI(M, Y)
  • TRAP(A, B, TO)
  • Chapter 14. Service and Utility Procedures
  • Efficient Floating-point Control and Inquiry Procedures
  • General Service and Utility Procedures
  • List of Service and Utility Procedures
  • Chapter 15. IEEE Modules and Support
  • Compiling and Exception Handling
  • General Rules for Implementing IEEE
  • IEEE Derived Data Types and Constants
  • IEEE_FLAG_TYPE
  • IEEE_STATUS_TYPE
  • IEEE_CLASS_TYPE
  • IEEE_ROUND_TYPE
  • IEEE_FEATURES_TYPE
  • IEEE Operators
  • IEEE PROCEDURES
  • Rules for Using IEEE Procedures
  • IEEE_CLASS(X)
  • IEEE_COPY_SIGN(X, Y)
  • IEEE_GET_FLAG(FLAG, FLAG_VALUE)
  • IEEE_GET_HALTING_MODE(FLAG, HALTING)
  • IEEE_GET_ROUNDING_MODE (ROUND_VALUE)
  • IEEE_GET_STATUS(STATUS_VALUE)
  • IEEE_IS_FINITE(X)
  • IEEE_IS_NAN(X)
  • IEEE_IS_NEGATIVE(X)
  • IEEE_IS_NORMAL(X)
  • IEEE_LOGB(X)
  • IEEE_NEXT_AFTER(X, Y)
  • IEEE_REM(X, Y)
  • IEEE_RINT(X)
  • IEEE_SCALB(X, I)
  • IEEE_SELECTED_REAL_KIND([P, R])
  • IEEE_SET_FLAG(FLAG, FLAG_VALUE)
  • IEEE_SET_HALTING_MODE(FLAG, HALTING)
  • IEEE_SET_ROUNDING_MODE (ROUND_VALUE)
  • IEEE_SET_STATUS(STATUS_VALUE)
  • IEEE_SUPPORT_DATATYPE(X)
  • IEEE_SUPPORT_DENORMAL(X)
  • IEEE_SUPPORT_DIVIDE(X)
  • IEEE_SUPPORT_FLAG(FLAG, X)
  • IEEE_SUPPORT_HALTING(FLAG)
  • IEEE_SUPPORT_INF(X)
  • IEEE_SUPPORT_IO(X)
  • IEEE_SUPPORT_NAN(X)
  • IEEE_SUPPORT_ROUNDING (ROUND_VALUE, X)
  • IEEE_SUPPORT_SQRT(X)
  • IEEE_SUPPORT_STANDARD(X)
  • IEEE_UNORDERED(X, Y)
  • IEEE_VALUE(X, CLASS)
  • Rules for Floating-Point Status
  • Examples
  • Chapter 16. OpenMP Execution Environment Routines and Lock Routines

  • Chapter 17. Pthreads Library Module
  • The Pthreads Data Structures
  • Functions That Perform Operations on Thread Attribute Objects
  • Functions and Subroutines That Perform Operations on Thread
  • Functions That Perform Operations on Mutex Attribute Objects
  • Functions That Perform Operations on Mutex Objects
  • Functions That Perform Operations on Attribute Objects of Condition Variables
  • Functions That Perform Operations on Condition Variable Objects
  • Functions That Perform Operations on Thread-Specific Data
  • Functions and Subroutines That Perform Operations to Control Thread Cancelability
  • Functions That Perform Operations for One-Time Initialization
  • Limitation and Caveats on the Use of the Argument arg

  • Part 5. Appendixes

  • Appendix A. Compatibility Across Standards
  • Fortran 90 compatibility
  • Obsolescent Features
  • Deleted Features
  • Appendix B. ASCII and EBCDIC Character Sets

  • Notices
  • Trademarks and Service Marks
  • Glossary

  • INDEX

  • [ Top of Page | Previous Page | Next Page | Table of Contents | Index ]