IBM Books

Language Reference

XL Fortran for AIX
Language Reference

Version 5 Release 1

SC09-2607-00


Note!

Before using this information and the product it supports, be sure to read the general information under "Notices".

First Edition (December 1997)

(Based on an earlier published work of IBM.)

This edition applies to Version 5, Release 1 of IBM XL Fortran for AIX and to all subsequent releases and modifications until otherwise indicated in new editions. Make sure you are using the correct edition for the level of the product.

Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address given below.

You can send your comments to the following address:

IBM Canada Ltd. Laboratory
Information Development
2G/345/1150/TOR
1150 Eglinton Avenue East
North York, Ontario, Canada. M3C 1H7
Attention: RCF Coordinator

You can also send your comments to IBM by facsimile (attention: RCF Coordinator), to (416) 448-6161, or you can send your comments electronically to IBM at the following addresses. Be sure to include your entire network address if you wish a reply.

Internet:  torrcf@vnet.ibm.com
IBMLink:   toribm(torrcf)
IBM/PROFS: torolab4(torrcf)
IBMMAIL:   ibmmail(caibmwt9)

When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.

Portions of this document are copied without fee from High Performance Fortran Language Specification, Version 1.1, CRPC-TR92225. Center for Research on Parallel Computation, Rice University. Houston, 1994. Permission is granted by Rice University.

© Copyright International Business Machines Corporation 1990, 1997. All rights reserved.
Note to U.S. government Users -- Documentation related to restricted rights -- Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule contract with IBM Corp.


Table of Contents

  • Notices
  • Trademarks and Service Marks
  • Summary of Changes for XL Fortran
  • Features and Extensions
  • Components of the XL Fortran Language
  • How to Use This Book
  • How to Read Syntax Diagrams
  • 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 Fortran 90?
  • Extensions
  • Valid and Invalid XL Fortran Programs

  • Part 2. Concepts and Elements

  • Chapter 2. The Language Elements
  • Characters
  • Names
  • Statements
  • Lines and Source Formats
  • Order of Statements and Execution Sequence
  • Chapter 3. Data Types and Data Objects
  • The Data Types
  • Data Objects
  • Intrinsic Types
  • Derived Types
  • Typeless Literal Constants
  • How Type Is Determined
  • Definition Status of Variables
  • Allocation Status
  • Storage Classes for Variables
  • Chapter 4. Array Concepts
  • Arrays
  • Array Declarators
  • Explicit-shape Arrays
  • Assumed-shape Arrays
  • Deferred-shape Arrays
  • Assumed-size Arrays
  • Array Elements
  • Array Sections
  • Array Constructors
  • Expressions Involving Arrays
  • Chapter 5. Expressions and Assignment
  • Introduction
  • Constant Expressions
  • Initialization Expressions
  • Restricted Expressions
  • Specification Expressions
  • Operators and Expressions
  • Extended Intrinsic and Defined Operations
  • Evaluating Expressions
  • Intrinsic Assignment
  • WHERE Construct
  • FORALL Construct
  • Pointer Assignment
  • Chapter 6. Control
  • Statement Blocks
  • IF Construct
  • CASE Construct
  • DO Construct
  • DO WHILE Construct
  • Branching
  • Chapter 7. Program Units and Procedures
  • Scope
  • Association
  • Program Units, Procedures and Subprograms
  • Interface Blocks
  • Generic Interface Blocks
  • Main Program
  • Modules
  • Block Data Program Unit
  • Function and Subroutine Subprograms
  • Intrinsic Procedures
  • Arguments
  • Argument Association
  • Recursion
  • Pure Procedures
  • Chapter 8. Input/Output Concepts
  • Records
  • Files
  • Units
  • Conditions and IOSTAT Values
  • Chapter 9. Input/Output Formatting
  • Format-directed Formatting
  • Editing
  • Data Edit Descriptors
  • Control Edit Descriptors
  • Interaction between Input/Output Lists and Format Specifications
  • List-directed Formatting
  • Namelist Formatting

  • 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
  • RETURN
  • REWIND
  • SAVE
  • SELECT CASE
  • SEQUENCE
  • Statement Function
  • STATIC
  • STOP
  • SUBROUTINE
  • TARGET
  • TYPE
  • Type Declaration
  • USE
  • VIRTUAL
  • VOLATILE
  • WAIT
  • WHERE
  • WRITE
  • Chapter 11. Directives
  • Introduction
  • ASSERT
  • CNCALL
  • CRITICAL / END CRITICAL
  • EJECT
  • INCLUDE
  • INDEPENDENT
  • PARALLEL DO
  • PARALLEL SECTIONS / END PARALLEL SECTIONS
  • PERMUTATION
  • @PROCESS
  • SCHEDULE
  • SOURCEFORM
  • THREADLOCAL

  • Part 4. Intrinsic and Library Procedures

  • Chapter 12. Intrinsic Procedures
  • Classes of Intrinsic Procedures
  • Data Representation Models
  • 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)
  • 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)
  • CHAR (I, KIND)
  • CMPLX (X, Y, KIND)
  • CONJG (Z)
  • COS (X)
  • COSD (X)
  • COSH (X)
  • COUNT (MASK, DIM)
  • 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)
  • 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)
  • 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)
  • MAXVAL (ARRAY, DIM, MASK)
  • MERGE (TSOURCE, FSOURCE, MASK)
  • MIN (A1, A2, A3, ...)
  • MINEXPONENT (X)
  • MINLOC (ARRAY, DIM, MASK)
  • MINVAL (ARRAY, DIM, MASK)
  • MOD (A, P)
  • MODULO (A, P)
  • MVBITS (FROM, FROMPOS, LEN, TO, TOPOS)
  • NEAREST (X,S)
  • NINT (A, KIND)
  • NOT (I)
  • NUMBER_OF_PROCESSORS (DIM)
  • NUM_PARTHDS
  • NUM_USRTHDS
  • PACK (ARRAY, MASK, VECTOR)
  • PRECISION (X)
  • PRESENT (A)
  • PROCESSORS_SHAPE ()
  • PRODUCT (ARRAY, DIM, 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)
  • SPACING (X)
  • SPREAD (SOURCE, DIM, NCOPIES)
  • SQRT (X)
  • SRAND (SEED)
  • SUM (ARRAY, DIM, 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. Service and Utility Procedures

  • Chapter 14. Pthreads Library Module
  • The Pthreads Data Structures
  • Limitation and Caveats on the Use of the Argument arg

  • Part 5. Appendixes

  • Appendix A. FORTRAN 77 Compatibility
  • Obsolescent Features
  • Appendix B. ASCII and EBCDIC Character Sets

  • Appendix C. Glossary

  • INDEX

  • [ Top of Page | Next Page | Index ]