f90 Tutorial
f90 Tutorial
Michael Metcalf
CN Division, CERN, CH 1211, Geneva 23, Switzerland
1
2
3
4
5
6
7
8
9
Language Elements
Expressions and Assignments
Control Statements
Program Units and Procedures
Array handling
Pointers
Specification Statements
Intrinsic Procedures
Input/Output
Index
1
6
8
9
12
16
20
22
23
25
Full details of all the items in this tutorial can be found in Fortran 90/95 Explained, by
M. Metcalf and J. Reid, (Oxford, 1996), the book upon which it has been based.
Fortran 90 contains the whole of FORTRAN 77only the new features are described in
this tutorial.
The tutorial is also available on WWW using the URL
!"#%$'&
.
The author wishes to thank Michel Goossens (CERN/CN) for his helpful and skilful assistance in preparing this tutorial.
Version of October 1995
Fortran 90 Tutorial
1. Language Elements
The basic components of the Fortran language are its character set. The members are:
the letters
and
the numerals
;
the underscore and
the special characters
53 46 /789:;
35?4?6 @A5B%C?D
"<>=
$$
up to 31 characters, including a
).
EF" %G 0
0%HJI%KML" T(can - have
+U)
NOPQRSP
From the tokens, we can build statements. These can be coded using the new free source form which does not require positioning
in a rigid column structure, as follows:
Note the trailing comments and the trailing continuation mark. There may be 39 continuation lines, and 132 characters per line.
Blanks are significant. Where a token or character constant is split across two lines:
Automatic conversion of source form for existing programs can be carried out by
options are:
significant blank handling;
indentation;
replaced by
;
name added to subprogram
statement; and
etc. syntax converted.
A@%XB>YgX%WD
YJXBDr5D%q 4
tI %u $ q
DX%lTlS@
DX%l
A@%XpD%qB
[" G 0%ZK n
Fortran 90 Tutorial
Fortran has five intrinsic data types. For each there is a corresponding form of literal constant. For the three numeric intrinsic
types they are:
YJXBDr%D%q
3 64 :9: 35
for the default kind; but we may also define, for instance for a desired range of
to
, a named constant, say K2"
oK0aE :
YgXBDr%D5q f%qM u DBD5q K2"
oK0aE D?DA%BD%l
YJXB
YJX%l 7
that allows us to define constants of the form
35354
%K6 27 "
5K
2o"K
0oE K0aE
Here, K2"
oK0aE is the kind type parameter; it can also be a default integer literal constant, like
3546 7
4
but use of an explicit literal constant would be non-portable.
YJX%l function supplies the value of a kind type parameter:
The
YJYJX%X%ll 3M
q3F
%KX2r5D"
oK0aEM
and the
the actual decimal range (so the user must make the actual mapping to bytes):
qMXr%D <35
%K2"function
oK0Esupplies
lB statements, binary, octal and hexadecimal constants may be used:
Also, in
C@ !! a35a3F7a835a9:\3 !!
! a35%35n46 !
qD?
lS@FWC?DTf%qDAY Y5@%X ). We might
There are at least two real kinds the default, and one with greater precision (this replaces
specify
YgXBDr%D5q f%qM u DBD5q U ">= D?DA5BD%l
qMD?
YJX%l
for at least 9 decimal digits of precision and a range of
to
, allowing
3 :
"<>=
Also, we have the intrinsic functions
fqM5qYJX%DXlAar%DY3 Y5 :@% X
: "<3 > =:
"<>=>
<3
">=
that give in turn the kind type value, the actual precision (here at least 9), and the actual range (here at least 99).
A@ u f?D
Examples are:
<3]U6 : ">=
lYFraYJB
Df YJ?@%X
War%D
u YgXDD ff@5@5XXDDXXBB
uf%qMDAaY YF@%X
q5lY
qXr%D
B>YgXe
Fortran 90 Tutorial
A M%qA%BD%q
'<!! N"%EJ' KK `ZML0%>Z =' '! ! !!
HJI1"%K0
(the last being a null string). Other kinds are allowed, especially for support of non-European languages:
4
! !
YgX%l function:
and again the kind value is given by the
YJX%l ! AaYY !
?@raY5A%?
The forms of literal constants for the two non-numeric data types are:
V? D
KZJI0
YJX%"l 0
L%K
and the
YJX%l B%qWD function
operates as expected:
We can specify scalar variables corresponding to the five intrinsic types:
qAYJXD@ BD?f?r5 D%D qYJX% l YgX% l"> =4>kkL
?A @u%raqY5MA5A%?BD%q ?DX f[I>ZZ ZG$0> K
A %qMA%BD%q ?DX 44 > 2MYgX%"%lZ $ S<sL> SsL
%2"%Z $
YJX%l parameter specifies a non-default kind, and the ?DX
where the optional
YgX%l and ?DX specifiers
are optional and the following works just as well:
A %qMA%BD%q Q4\ S1sL> S<sL
%2M"%Z $
Here, there may also be different kinds (to allow for packing into bits):
For derived-data types we must first define the form of the type:
BefDA Mt%q0%ZSE5A%"BD%q
35S^%=MJdS0 0
q
D
?
DX%l BefD t05Z>E5"
o"I ) 5=0
qualifier:
0
Fortran 90 Tutorial
K))
K))o K))
05K[
ZM0 :
We note that the qualifier was chosen rather than because of ambiguity difficulties.
Arrays are considered to be variables in their own right. Given
(the latter an example of the syntax that allows grouping of attributes to the left of
and of variables sharing those attributes
to the right), we have two arrays whose elements are in array element order (column major), but not necessarily in contiguous
storage. Elements are, for example,
j3
j#Ls>
and are scalars. The subscripts may be any scalar integer expression. Sections are
d]
Whole arrays and array sections are array-valued objects. Array-valued constants (constructors) are available:
so that
K\K\##4>4> ) G 0%ZK0
Fortran 90 Tutorial
t%=0jQs>>#L La3
Fortran 90 Tutorial
converts integer to a real value of the same kind as real1; the result is of same kind, and is converted to the kind of real2 for
assignment.
For scalar relational operations, there is a set of new, alternative operators:
, , - -
In the case of scalar characters, two old restrictions are lifted. Given
A %qMA%BD%q ; hZ0aEQI K
For an operation between derived-data types, or between a derived type and an intrinsic type, we must define the meaning of
the operator. (Between intrinsic types, there are intrinsic operations only.) Given
BefDYJXBEgKDZr5LD%>q =
0> =K `
A
%
q
M
%
A
B
%
D
q
;
G
DA X%l5qBeA%fBDD5q EJKZL S`=> I` 0 `
BefD EJKZML>=i[EgKZ>%Z>3]3] [EJKZ%Z4\4 [EgKZ% Z6 6
we can write
EJEJKKZMZM66
[EJ`KZM5Z6 6
JE KZS35 aEJKZ4
[EJ``KZS5Z3 4["1[ `[%%ZK 6 EgKZ4
[ 5Z>3
For the first three cases, assignment applies on a component-by-component basis (but can be overridden), and the first two cases
require us to define the exact meaning of the // symbol. We see here the use both of an intrinsic symbol and of a named operator,
. A difference is that, for an intrinsic operator token, the usual precedence rules apply, whereas for named operators
their precedence is the highest as a unary operator or the lowest as a binary one. In
["[%K
GG 0[5K"%Z6
0[5K"%Z6
Sd %KZML
ad %KZL KLFdS0E
the two expresions are equivalent only if appropriate parentheses are added as shown. In each case, we have to provide, in a
module, procedures defining the operator and assignment, and make the association by an interface block, also in the module
(we shall return to this later).
Fortran 90 Tutorial
JY XBD%q@FlVW?A5DTDOf%@%qSfD%@qMA5D%lBW@Fqq D Q>
EJKZLS=
["1[%K
DX%l u YJXBD%qVMA%D
and an example of part of a module containing the definitions of character-to-string and string to character assignment. The
string concatenation function was shown already in part 1.
[E
[E
Defined operators such as these are required for the expressions that are allowed too in structure constructors (see chapter 1):
So far we have discussed scalar variables. In the case of arrays, as long as they are of the same shape (conformable), operations
and assignments are extended in an obvious way, on an element-by-element basis. For
can write
The order of expression evaluation is not specified in order to allow for optimization on parallel and vector machines. Of course,
any operators for arrays of derived type must be defined.
There are some new real intrinsic functions that are useful for numeric computations:
DXA%D>Df%YJq?>@%XDYgXDXBr B
A%?D
VV%q?M@@FA%qB>Y5@%X
u @FlW?@ # EF"OL>K05=0%Z
qqDB fD AafYJXM@5Xr DXB fMAaYJXr
YgX , %C , etc., but not ?DX ), these are array valued for array arguments (i.e. are elemental).
Like all FORTRAN 77 functions (
Fortran 90 Tutorial
3. Control Statements
The CASE construct is a replcement for the computed GOTO, but is better structured and does not require the use of statement
labels:
Iad 05Z
3
Each CASE selector list may contain a list and/or range of integers, character or logical constants, whose values may not overlap
within or between selectors:
A default is available:
A% DOlDV%W?B
"LISK0%0%ZZ Sl @ Sl @ L s\^
&
YJV A%eMA%?D " omL<>K0%=05Z>E
YJV D SYJB
L05 Z "I>K0%Z
D
%
X
T
l
S
l
@
DX%lTlS@ "ISK0%Z
where we note that loops may be named so that the EXIT and CYCLE statements may specify which loop is meant.
Many, but not all, simple loops can be replaced by array expressions and assignments, or by new intrinsic functions. For instance
SlK"%@ K L d _
DX%lTKlS"%K@ K"%K jQL>
becomes simply
Fortran 90 Tutorial
W CqqSD@JW?B>YJXD "I>K0%Z
Uo
A@%XBWSCYJqSX @JWB>YJXD
qD? o L 0%Z
o 3
DX%l DX%lWCqaW@FCWqaB>@FYJWXB>D YJ"XI>D KL05Z 05Z
We say that outer is the host of inner, and that inner obtains access to entities in outer by host association (e.g. to x), whereas
y is a local variable to inner. The scope of a named entity is a scoping unit, here outer less inner, and inner.
The names of program units and external procedures are global, and the names of implied-DO variables have a scope of the
statement that contains them.
Modules are used to package
global data (replaces COMMON and BLOCK DATA);
type definitions (themselves a scoping unit);
subprograms (which among other things replaces the use of ENTRY);
interface blocks (another scoping unit, see next article);
namelist groups.
An example of a module containing a type defition, interface block and function subprogram is:
provides use association to all the modules entities. Module subprograms may, in turn, contain internal subprograms.
Fortran 90 Tutorial
10
Arguments
We may specify the intent of dummy arguments:
Also, INOUT is possible: here the actual argument must be a variable (unlike the default case where it may be a constant).
Arguments may be optional:
WCqqSD@JW?B>YJX@%D fdSB>LY5@%X["<? / l^Y n D X Y5 @5IX tt0%Z "520%Z 05HJI L5KL0aE] L 0%HJI1 L%KL0aE]_[" G 0 EJKM%ZK
Itt05Z "%20%Z
u
allows us to call dSL[" by
A%?? dSL1["/ n _Itt0%Z1
and in daL[" we have someting like:
YJV f5qD DXB "%2M0%Z B MDX & K0aEJKTn"5ZitSZ0aE501[0T"%n [%KJI %Z=JIdS0>K
Optional and keyword arguments are handled by explicit interfaces, that is with internal or module procedures or with interface
blocks.
Interface blocks
Any reference to an internal or module subprogram is through an interface that is explicit (that is, the compiler can see all the
details). A reference to an external (or dummy) procedure is usually implicit (the compiler assumes the details). However,
we can provide an explicit interface in this case too. It is a copy of the header, specifications and
statement of the procedure
concerned, either placed in a module or inserted directly:
DX%l
& Z0%KgI>qDZJjq?TE DV%K`W? XM0iA%dSB>YJXL<Y5B@%DLFX d5XdSIaB dLGLFdF Ia Id 0T#\"% nT K ` nJ0RInJI[>1 [%KL" nJI[j L K ` 0TL>K05Z G Q\
YJXBqD%qMD V?TA%V%D WXA%BSQLY5\@%X \
nJB I YJ[jX
q
D
?
J
Y
X
B
D
X
DqX%DlD? X5YJlmXBD5V5qWVXA%B>A%DYF@%X nJI1[
n
n nJI[] & L G "[%KL" "%nTK ` 0 IjEF0%ZTnJI[%KML"
DX%l V%WXA5B>Y5@%X daLLFd5Id
f@aYgXBD%q and B%qSr%DB arguments (see later article), a
An explicit interface is obligatory for: optional and keyword arguments,
f@YJXBD%q function result (later) and new-style array arguments and array functions
(later). It allows full checks at compile time
between actual and dummy arguments.
Fortran 90 Tutorial
11
YJXBV%D%WqMXVA%BSA%DY5@%=MX FddS
&& =010%ZL[ Fda0
EJ=MDF?dDMdSA%jBD% l
qD?
JY X5l 9 OE#EJt=0Jd[dSL%n\L [ JdS0On"%Z
q
D
?
DV%WX%lXA%BSY5@%X
$ =MDF?dDMdSA%jBD% l qD? YJX5l & $#E t0[L%nL[ JdS0On"%Z
q
D
?
3F4> = JddS\
DX%l
DX%l YJXBD5qVA%D
where a given set of specific names corresponding to a generic name must all be of functions or all of subroutines.
We can use existing names, e.g. SIN, and the compiler sorts out the correct association.
We have already seen the use of interface blocks for defined operators and assignment (see Part 2).
Recursion
Indirect recursion is useful for multi-dimensional integration. To calculate
we might have
Fortran 90 Tutorial
12
5. Array handling
Array handling is included in Fortran 90 for two main reasons:
the notational convenience it provides, bringing the code closer to the underlying mathematical form;
for the additional optimization opportunities it gives compilers (although there are plenty of opportunities for degrading
optimization too!).
At the same time, major extensions of the functionality in this area have been added.
We have already met whole arrays in Parts 1 and 2here we develop the theme.
Zero-sized arrays
lS@ L 3]
##L>L 3 i \ #L> T#L j 3#L\ \U L> j#L 3 L> #L>
DX%lTlS@
A zero-sized array is handled by Fortran 90 as a legitimate object, without special coding by the programmer. Thus, in
3 > 6
These are an extension and replacement for assumed-size arrays. Given an actual argument like:
the corresponding dummy argument specification defines only the type and rank of the array, not its size. This information has
to be made available by an explicit interface, often using an interface block (see part 4). Thus we write just
and this is as if da were dimensioned (11,21). However, we can specify any lower bound and the array maps accordingly. The
shape, not bounds, is passed, where the default lower bound is 1 and the default upper bound is the corresponding extent.
Automatic arrays
A partial replacement for the uses to which EQUIVALENCE is put is provided by this facility, useful for local, temporary arrays,
as in
Fortran 90 Tutorial
13
The work array can be propagated through the whole program via a USE statement in each program unit. We may specify an
explicit lower bound and allocate several entities in one statement. To free dead storage we write, for instance,
lD??M@A%BD #\
In the second assignment, an intrinsic function returns an array-valued result for an array-valued argument. We can write arrayvalued functions ourselves (they require an explicit interface):
WHERE
Fortran 90 Tutorial
14
Array elements
Simple case: given
we can reference a single element of as, for instance,
is an element of it. The basic rule to remember is that an array element always has a subscript or subscripts qualifying at least
the last name.
as in
Note that a vector subscript with duplicate values cannot appear on the left-hand side of an assignment as it would be ambiguous.
Thus,
is illegal. Also, a section with a vector subscript must not be supplied as an actual argument to an
ment.
Arrays of arrays are not allowed:
K%Z ) $ I
& L %0 =
@FWB or YJX@FWMB
dummy argu-
Fortran 90 Tutorial
15
We note that a given value in an array can be referenced both as an element and as a section:
?X?e
A@FWpXB ?
uu YJXp?
f%qSW @FlWSA%B
u
?%CS??@FWM@X%A%lBD%l
Y5%fD D
WCS@FWMX%l
ufD%qSA r5D
Wf%XqfDM%A l
Array reduction
Array inquiry
Array construction
qD MfD
uu YJX?M?M@@AA
Array reshape
Array manipulation
Array location
GG I10RL<P<N%ZZM%o
I10RL<P<N%ZZM%o
Fortran 90 Tutorial
16
6. Pointers
Basics
f@aYgXBD%q attribute; they are not a distinct data type (and so no pointer arithmetic is possible):
qD? f@aYJXBD%q _G %Z
They are conceptually a descriptor listing the attributes of the objects (targets) that the pointer may point to, and the address, if
any, of a target. They have no associated storage until it is allocated or otherwise associated (by pointer assignment, see below):
??M@A%BD G % Z
YJXBDr%D%q f@aYJXBD%q
G %Z - L SK
G %Z L >K
G %Z
and, similarly, for arrays the ranks as well as the type must agree.
A pointer can be a component of a derived data type:
After suitable allocations and definitions, the first two entries could be addressed as
[[ `` LL )) 00
[ ` L ) 0
KK )) GL $ I10 0
K ) 0 K
but we would normally define additional pointers to point at, for instance, the first and current entries in the list.
Fortran 90 Tutorial
17
Association
A pointers association status is one of
undefined (initial state);
associated (after allocation or a pointer assignment);
disassociated:
or between a defined pointer and a defined target (which may, itself, be a pointer):
o C AR
qqDD?? Bf%@aqSYJXr5DBBD%q 35 35> [j35\#35>^Z 35>hE<35\ < 35>
YJXBDMr% D%q d5I K j o\
lS @ d5YJIV K 3]U4 B DX
o d5I - K Z 3
& " $ %KidS" G 0FdS0SK
--O [
D? D & " $ %KidS" G 0FdS0SK
o - E
DX%l YJV B- ZW?
& ["Fdda" [ [I %KML"
DX%lTo lS@ u u #
For intrinsic types we can sweep pointers over different sets of target data using the same code without any data movement.
Given the matrix manipulation
, we can write the following code (although, in this case, the same result could be
achieved more simply by other means):
For objects of derived data type we have to distinguish between pointer and normal assignment. In
nL%Z>EgK [<I>ZZ0SK
Fortran 90 Tutorial
18
Pointer arguments
If an actual argument is a pointer then, if the dummy argument is also a pointer,
it must have same rank,
it receives its association status from the actual argument,
it returns its final association status to the actual argument (note: the target may be undefined!),
it may not have the INTENT attribute (it would be ambiguous),
it requires an interface block.
If the dummy argument is not a pointer, it becomes associated with the target of the actual argument:
Pointer functions
Function results may also have the
function, as in
f@aYJXBD%q
attribute; this is useful if the result size depends on calculations performed in the
The result can be used in an expression (but must be associated with a defined target).
Arrays of pointers
These do not exist as such: given
then
Z"%2>E ) 0 K
& L %0 =M
would be such an object, but with an irregular storage pattern. For this reason they are not allowed. However, we can achieve
the same effect by defining a derived data type with a pointer as its sole component:
Fortran 90 Tutorial
19
where the storage for the rows can be allocated by, for instance,
E K
E#L> ) Z - K #L> ) Z
K5ZJI - K %Z ) I
DJWYJp?DXA%D
The subscripts are as those of tar itself. (This replaces yet more of
.)
The source code of an extended example of the use of pointers to support a data structure can be obtained by anonymous ftp to
(130.246.8.23). The directory is
and the file name is
.
<tI %uM $ q
tt = n
Fortran 90 Tutorial
20
7. Specification Statements
This part completes what we have learned so far about specification statements.
Implicit typing
The implicit typing rules of Fortran 77 still hold. However, it is good practice to explicitly type all variables, and this can be
forced by inserting the statement
Y u f?>Y5AaYJBTX@5XD
PARAMETER attribute
DATA statement
l B
llBefBBD KSKZ35%L<tKZ L<0%t K 0%9%K\7 K> 3] 9%O7 K#m4 h3 U4 >mg\ K4 ) I
lB 5L ZhZ%s\o\^<S3 C ! a3535a35a3 ! @ ! ::\! \! nn !
statement can be used also for arrays and variables of derived type. It is also the only way to initialise just parts of
The
such objects, as well as to initialise to binary, octal or hexadecimal values:
Characters
There are many variations on the way character arrays may be specified. Among the shortest and longest are
Initialization expressions
and
statements, or in specification statements with these attributes, are constant expresThe values used in
sions that may include references to: array and structure constructors, elemental intrinsic functions with integer or character
arguments and results, and the six transformational functions
,
,
,
,
and
:
Specification expressions
It is possible to specify details of variables using any non-constant, scalar, integer expression that may also include inquiry
function references:
d[
[[
&& [ "SKLjE `
& a I>EKMEQIa"FdSdS%0 $KL[OE %tZZ0 5%o ZZM%o
&& aEEQIadS0 $ 0>=K `
& t>I>ZKM0"F[dSLa%E5KLL"<[O""%n s 0[%KK 2ML[0OK ` %K "%n
Fortran 90 Tutorial
21
& $ 05nI K
The statement form has to be used to limit access to operators, and can also be used to change the overall default:
f%f%qWCMYgp?>Y5BA D
W D
Fortran 90 Tutorial
22
8. Intrinsic Procedures
We have already met most of the new intrinsic functions in previous parts of this series. Here, we deal only with their general
classification and with those that have so far been omitted.
All intrinsic procedures can be referenced using keyword arguments:
and many have optional arguments. They are grouped into four categories:
1.
2.
3.
4.
5C #>
e B D Mu A%?@A
C1YJB YF%D
Bit manipulation
CMYgBDX%l B
Y<Y<CSCA%YJ?%B q
Y<YgCD@FqDB
YFY @Fq VB
XMY @%B VBA
C? L%KTK0aEgKL>X%l=
AC "% =0L5Z[ L%K
L%0%KK 0 L%KK Z[%KL"
DY [ IjE5L G 0 @F@Fqq
?A "%=[ L Ij[E5L G 0E ` ` L%nK
? L%"%Z=[<LI[ % Zm["FE d5tL%n K0FdS0SK
Transfer function, as in
Subroutines
Fortran 90 Tutorial
23
9. Input/Output
Non-advancing input/output
Normally, records of external, formatted files are positioned at their ends after a read or write operation. This can now be overridden with the additional specifiers:
%Dl@FqpXA%D ! X@\!
Y55D 0"%E5ZL
0 0
!
"<"< oo
The next example shows how to read a record three characters at a time, and to take action if there are fewer than three left in
the record:
q%qD%YJlBD ## !! Y 35 >! ! % lpXMA%D ! XM@\t>! Z LFdS! D0> KIa05Zid 10%0Z K t>ZLFda0 Iad 0%Z !
Y edit descriptor:
binary,
octal,
hexadecimal.
There are two new descriptors for real numbers:
DX engineering, multiple-of-three exponent: 4a3 : - 4a3 : D 6 D XM >4
D scientific, leading nonzero digit: 4a3 : - 4 3 :5D 4 D 4>
r
D V Y ?
and the edit descriptor is generalized to all intrinsic types ( , , , ).
For entities of derived types, the programmer must elaborate a format for the ultimate components:
BefDYJXBEJDKZMr5D%L>q = `
0>?=DKX
A
%
q
M
%
A
B
%
D
q
DBX%elfD BefD EJKZL >= 4> 2M"%Z $
qD%l <Q\EJK ZL! S =Y 4\ K! 0 KK 0 K
Fortran 90 Tutorial
24
New specifiers
is a portability aid.
and thus
Index
actual argument, 10, 12, 18
aliases, 19
ALLOCATE, 13
argument, 10
array construction, 15
array constructors, 4
array elements, 14
array inquiry, 15
array location, 15
array manipulation, 15
array reduction, 15
array reshape, 15
array sections, 4
array subobjects, 14
arrays, 4
arrays intrinsic functions, 15
arrays of pointers, 18
assignment, 6, 13
association, 17
assumed-shape arrays, 12
automatic arrays, 12
hexadecimal, 2, 20
implicit typing, 20
initialization
of expressions, 20
input/output
new edit descriptors, 23
new specifiers, 24
non-advancing , 23
inquiry functions, 2
INTEGER, 2
INTENT, 1, 7, 9
interface, 6
interface block, 10, 11, 18
intrinsic functions, 7, 15, 17, 20, 22
keyword, 22
kind type parameter, 2
letters, 1
linked chain, 16
LOGICAL, 3
lower bound, 12, 13
binary, 2, 20
bit inquiry, 22
bit manipulation, 22
blank, 1
matrix multiply, 15
model numbers, 2
modules, 7, 9, 10, 21
CASE construct, 8
CHARACTER, 3, 20
comments, 1
COMPLEX, 2
components, 3
constant expressions, 20
continuation, 1
conversion, 1
cursor, 23
named constant, 2
named operators, 6
numerals, 1
octal, 2, 20
operator, 6
optional, 22
overloading, 11
PARAMETER, 20
parentheses, 6
POINTER, 16
pointer
s as dynamic aliases, 19
s in expressions and assignments, 17
arguments, 18
arrays of s, 18
functions, 18
pointer assignment, 16, 17, 19
precedence, 6
PRIVATE, 21
prompt, 23
PUBLIC, 21
DATA, 20
defined operators, 7
derived data type, 14, 16, 17, 21
DO construct, 8
dummy argument, 10, 12, 18
edit descriptors, 23
element, 4, 14
elemental, 7
elemental operation, 13
explicit interface, 10
expressions
initialization of , 20
specification of , 20
generic interfaces, 11
generic names, 11
range, 2
rank, 12, 18
REAL, 2
recursion, 11
heap storage, 13
scope, 21
formatted files, 23
25
Fortran 90 Tutorial
section, 14
shape, 7
significant blank, 1
special characters, 1
statements, 1
structure constructor, 3
structures, 3
subscripts, 4, 19
targets, 16
unary operator, 6
underscore, 1
upper bound, 12
USE, 21
vector multiply, 15
vector subscript, 14
WHERE, 13
zero-length strings, 5
zero-sized arrays, 12
26