User's Guide
This book is for anyone who wants to work with the XL
Fortran compiler, who is familiar with the AIX operating system, and who has
some previous Fortran programming experience.
This book can help you understand what the features of the compiler
(especially the options) are for, and how to use them for effective software
development.
This book is not the place to find help on:
- Installation,
- which is covered in the books that are listed in XL Fortran and Operating System Publications.
- Writing Fortran programs,
- which is covered in the XL Fortran for AIX Language
Reference.
The first part of this book is organized according to the steps necessary
to compile, link, and run a program, followed by information on particular
features of the XL Fortran compiler and the programs it produces.
The second part discusses more general software-development topics.
Depending on your level of experience and what you want to do, you may need
to start reading at a particular point or read in a particular
sequence. If you want to:
- Set up the compiler for yourself or someone else,
- read Where to Find Installation Instructions.
- Upgrade from an earlier (Fortran 90 or FORTRAN 77) compiler,
- read Avoiding or Fixing Upgrade Problems.
- Create customized compiler defaults,
- read Customizing the Configuration File.
- Understand what all the compiler options are for and how they relate to
each other,
- browse through Summary of the XL Fortran Compiler Options.
- Look up a particular option by name,
- scan alphabetically through Detailed Descriptions of the XL Fortran Compiler Options.
- Port a program to XL Fortran,
- read Options for Compatibility to see what options you may need, then Chapter 14. Porting Programs to XL Fortran for other porting information.
This book uses notation often referred to as "railroad tracks"
to illustrate syntax for Fortran statements and AIX commands. Syntax for compiler options is illustrated through statements,
using notation often referred to as "braces and brackets".
Fortran keywords are shown in uppercase: for example, OPEN,
COMMON, and END. You must spell them exactly as they
are shown, although they are not case-sensitive.
Variable names and user-specified names appear in lowercase italics; for
example, array_element_name.
If a variable or user-specified name ends in _list, it means that
you can provide a list of terms that are separated by commas.
You must enter punctuation marks, parentheses, arithmetic operators, and
other special characters as part of the syntax.
- Read syntax diagrams from left to right and from top to bottom,
following the path of the line:
- The >>--- symbol indicates the beginning of a
command.
- The ---> symbol indicates that the command syntax
continues on the next line.
- The >--- symbol indicates that a command is continued
from the previous line.
- The --->< symbol indicates the end of a
command.
- Diagrams of syntactical units smaller than complete statements start with
the >--- symbol and end with the --->
symbol.
- Constructs, interface blocks and derived type definitions consist of
several individual statements. For such items, individual syntax diagrams show the required order
for the equivalent Fortran statements.
- Required items appear on the horizontal line (the main path):
>>-command_name--required_argument-----------------------------><
- Optional items appear below the main path:
>>-command_name--+-------------------+-------------------------><
'-optional_argument-'
- If you can choose from two or more items, they appear vertically, in a
stack.
If you must choose one of the items, one item of the stack
appears on the main path:
>>-command_name--+-required_argument-+-------------------------><
'-required_argument-'
If choosing one of the items is optional, the entire stack appears below
the main path:
>>-command_name--+-------------------+-------------------------><
+-optional_argument-+
'-optional_argument-'
- An arrow returning to the left above the main line (a "repeat arrow")
indicates an item that can be repeated, and the separator character if it is
other than a blank:
.-:----------------------.
V |
>>-command_name-----repeatable_argument---+--------------------><
A repeat arrow above a stack indicates that you can make more than one
choice from the stacked items.
.-,----.
V |
>>-EXAMPLE--char_constant--+-a-+---+----+------e---+---name_list-->
'-b-' +-c--+
'-d--'
>--------------------------------------------------------------><
Interpret the diagram as follows:
- Enter the keyword EXAMPLE.
- Enter a value for char_constant.
- Enter a value for a or b, but not for both.
- Optionally, enter a value for c or d.
- Enter at least one value for e. If you enter more than one
value, you must put a comma between each.
- Enter the value of at least one name for
name_list. If you enter more than one value, you must put a
comma between each. (The _list syntax is equivalent to the
previous syntax for e.)
Syntax statements are read from left to right:
- Individual required arguments are shown with no special notation.
- When you must make a choice between a set of alternatives, they are
enclosed by { and } symbols.
- Optional arguments are enclosed by [ and ] symbols.
- When you can select from a group of choices, they are separated by |
characters.
- Arguments that you can repeat are followed by ellipses (...).
EXAMPLE char_constant {a|b}[c|d]e[,e]... name_list
The following list explains the syntax statement:
- Enter the keyword EXAMPLE.
- Enter a value for char_constant.
- Enter a value for a or b, but not for both.
- Optionally, enter a value for c or d.
- Enter at least one value for e. If you enter more than one
value, you must put a comma between each.
- Enter the value of at least one name for
name_list. If you enter more than one value, you must put a
comma between each. (The _list syntax is equivalent to the
previous syntax for e.)
- The examples in this book are coded in a simple style that does not try to
conserve storage, check for errors, achieve fast performance, or demonstrate
all possible ways to do something.
- The examples in this book use the xlf, xlf_r, xlf_r7, xlf90,
xlf90_r, xlf90_r7, xlf95, xlf95_r, and
xlf95_r7 compiler invocation commands interchangeably. For more substantial source files, one of these commands may be
more suitable than the others, as explained in Compiling XL Fortran Programs.
- Some sample programs from this book, and some other programs that
illustrate ideas presented in this book, are in the directory
/usr/lpp/xlf/samples.
Some of the terminology in this book is shortened, as follows:
- The term free source form will often appear as free
form.
- The term fixed source form will often appear as fixed
form.
- The term XL Fortran will often appear as XLF.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
© Copyright IBM Corporation 1990, 1998.