Intel fortran-80 manual 6.4.3FORMAT Statement, t Edit Descriptors, stl FORMAT flist

Models: fortran-80

1 130
Download 130 pages 742 b
Page 76
Image 76
6.4.3FORMAT Statement

Input/Output

FORTRAN-SO

6.4.3FORMAT Statement

The form of the FORMAT statement is

stl FORMAT ([flist])

where

stlis a 1-5 digit statement label

JUst is a format specification list whose items are separated by commas

Each item in 'flist' must be a repeatable edit descriptor, a nonrepeatable edit descriptor, or a parenthesized 'flist.' An edit descriptor is repeated by prefixing it with a nonzero, unsigned integer constant called a 'repeat specification.' The entire 'flist' can also be prefixed by a repeat specification.

F5.3Repeatable descriptor

5F5.3Repeatable descriptor prefixed with repeat specification' 5'

XNonrepeatable descriptor

3(2X,I5) Entire 'flist' prefixed with repeat specification '3'

Note that the FORMAT statement with no 'flist' specified, 'FORMAT ( ),' can be used only if the 110 list is also empty. Conversely, if the 110 list is not empty, 'flist' must have at least one repeatable edit descriptor.

6.4.3.t Edit Descriptors

6.4.3.1.1Repeatable Edit Descriptors. Repeatable edit descriptors generally consist of a letter indicating the type of data involved and a number indicating the size of the data field and how it is to be divided. The repeatable edit descriptors are:

lw

Integer descriptor

Fw.d

Real number descriptor

Ew.d

Real number descriptor

Ew.dEe

Real number descriptor

Lw

Logical descriptor

A

Variable-length alphanumeric descriptor

Aw

Fixed-length alphanumeric descriptor

Bw

Binary descriptor

Zw

Hexadecimal descriptor

where

 

I, F, E,

indicate the type of data being edited

LandA

 

BandZ

indicate the number base of data being edited

w

is a nonzero, unsigned integer constant representing the width

 

of the entire edited field

d

is an unsigned integer constant representing the number of

 

digits that should follow the decimal point.

e

is a nonzero, unsigned integer constant representing the width

 

of the exponent field.

The I, F, and E edit descriptors are used to specify 110 of integer and real data. F and E serve the same function on input; E allows output of real numbers in scientific notation.

6-16

Page 76
Image 76
Intel fortran-80 manual 6.4.3FORMAT Statement, t Edit Descriptors, stl FORMAT flist