Intel fortran-80 manual Is Ff

Models: fortran-80

1 130
Download 130 pages 742 b
Page 77
Image 77

FORTRAN-80

Input/Output

Certain general remarks apply to all three of these numeric editing descriptors.

On input, leading blanks are not significant. Other blanks are treated according to the setting of the non repeatable descriptors BN and BZ and the value of the BLANK sp~cifier in the OPEN statement (section 6.2.1.9).

A decimal point in input data overrides the decimal point location specified by an For E descriptor. The input field may also have more digits than are needed for the processor to approximate the data's value.

On output, values are right-justified. If necessary, the field is blank-filled on the left.

On output, if the number of characters exceeds the field width 'w,' or an exponent has more than 'e' digits, the entire field is filled with asterisks.

The B and Z cdit descriptors specify data 110 in binary and hexadecimal notation, respectively. The internal representation of the data is output (e.g., the 'Z' format of

'-1' is 'Ff').

Integer Editing

An I/O list item matched with an 'Iw' edit descriptor must be of type integer. The input list item is defined with integer data; the output list item must already be defin- ed with integer data. The integer constant read or written always consists of at least one digit.

Examples:

PRINT 20, INTNUM

20 FORMAT (15)

READ (2,20) INTNM1, INTNM2, INTNM3

20FORMAT (215,14)

<F' Descriptor Editing

An I/O list item matched with an 'Fw.d' descriptor must have a real value. If the in- put to this descriptor contains no decimal point, the rightmost 'd' digits of the string are interpreted as the fractional part of the input value.

On input, a string of digits by the basic 'F'descriptor can be followed by an expo- nent consisting of a signed integer constant or the letter 'E' followed by an optional- ly signed integer constant.

Output edited by the 'F' descriptor is rounded to 'd' fractional digits, and may be modified by an established scale factor (see the description of the 'P' nonrepeatable edit descriptor, section 6.4.3.1.2). Leading zeros are not generated unless the output field would be blank otherwise.

Examples:

READ (2,20) REALN M

20 FORMAT (F5.3)

DIMENSION TABLE (10) PRINT 20, TABLE

20 FORMAT 5(F5.3, 2X, F5.3)

CTHE TABLE WILL BE PRINTED OUT IN TWO COLUMNS

6-17

Page 77
Image 77
Intel fortran-80 manual Is Ff