11.2.1 Forms for Data Edit Descriptors

A data edit descriptor takes one of the following forms:

[r]c
[r]cw
[r]cw.i
[r]cw.d
[r]cw.d[Ee]

r
Is a repeat specification. The range of r is 1 through 2147483647 (2**31-1. If r is omitted, it is assumed to be 1.

c
Is one of the following format codes: I, B, O, Z, F, E, EN, ES, D, G, L, or A.

w
Is the total number of digits in the field (the field width). If omitted, the system applies default values (see Section 11.2.7). The range of w is 1 through 2147483647 (2**31-1) on Alpha and ia64 processors; 1 through 32767 (2**15-1) on ia32 processors. For I, B, O, Z, and F, the range can start at zero.

m
Is the minimum number of digits that must be in the field (including leading zeros). The range of m is 0 through 32767 (2**15-1) on Alpha and ia64 processors; 0 through 255 (2**8-1) on ia32 processors.

d
Is the number of digits to the right of the decimal point (the significant digits). The range of d is 0 through 32767 (2**15-1) on Alpha and ia64 processors; 0 through 255 (2**8-1) on ia32 processors.

The number of significant digits is affected if a scale factor is specified for the data edit descriptor.

E
Identifies an exponent field.

e
Is the number of digits in the exponent. The range of e is 1 through 32767 (2**15-1) on Alpha and ia64 processors; 1 through 255 (2**8-1) on ia32 processors.

Rules and Behavior

Fortran 95/90 (and the previous standard) allows the field width to be omitted only for the A descriptor. However, Compaq Fortran allows the field width to be omitted for any data edit descriptor.

The r, w, m, d, and e must all be positive, unsigned, integer literal constants; or variable format expressions; no kind parameter can be specified. They must not be named constants.

Actual useful ranges for r, w, m, d, and e may be constrained by record sizes (RECL) and the file system.

The data edit descriptors have the following specific forms:

Integer:  Iw[.m], Bw[.m], Ow[.m], and Zw[.m] 
Real and complex:  Fw.d, Ew.d[Ee], ENw.d[Ee], ESw.d[Ee], Dw.d, and Gw.d[Ee] 
Logical:  Lw 
Character:  A[w] 

The d must be specified with F, E, D, and G field descriptors even if d is zero. The decimal point is also required. You must specify both w and d, or omit them both.

A repeat specification can simplify formatting. For example, the following two statements are equivalent:

  20  FORMAT (E12.4,E12.4,E12.4,I5,I5,I5,I5)
  20  FORMAT (3E12.4,4I5)

For More Information:


Previous Page Next Page Table of Contents