Intel fortran-80 manual CHARACTER Type Statement, IMPLICIT Statement, CHARACTER * len, name ,name

Models: fortran-80

1 130
Download 130 pages 742 b
Page 29
Image 29
3.1.4 CHARACTER Type Statement

FORTRAN-SO

Defining Variables t Arrayst And Memory

Examples:

LOGICAL *2 FLAG

LOGICAL* 1 FLAGS(10)

LOGICAL *4 FLAG1, FLAG2, SWITCH(5)*1

3.1.4 CHARACTER Type Statement

The CHARACTER type statement has the format:

CHARACTER [* len[,]] name [,name] ...

where 'name' is one of the forms:

v[* len]

ary[(d)][* len]

and

vis a variable name

ary is an array name

ary(d) is an array declarator

len is the length (number of characters) of a character variable or character array element.

The length specification immediately following the keyword CHARACTER applies to each item in the statement not having its own length specification. A length specification immediately following an item is the length for that item only. For an array, the length applies to each array element. If no length is specified, the standard length of a character (one byte) is assumed.

Examples:

CHARACTER*15 STRING

CHARACTER*12 NAMES(50), CITIES(50), STATES(50)*5

CHARACTER LETTER

3.1.5 IMPLICIT Statement

An IMPLICIT statement defines the type and length for symbolic names (except in- trinsic function names) that begin with the letter(s) specified by IMPLICIT. IM- PLICIT types can be overridden, however, by type statements or by an explicit type specification in a FUNCTION statement. The length specified in an IMPLICIT statement can also be overridden by an INTEGER, LOGICAL, or CHARACTER statement containing the same symbolic name.

3-3

Page 29
Image 29
Intel fortran-80 manual CHARACTER Type Statement, IMPLICIT Statement, CHARACTER * len, name ,name, v* len aryd* len