/sys$common/syshlp/helplib.hlb FORTRAN, Statements, FORMAT *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Defines the conversion of data in formatted data transfer operations. Statement format: FORMAT (q1 f1s1 f2s2 ... fnsn qn) qn Is zero or more slash (/) record terminators. fn Is a field descriptor, an edit descriptor, or a group of field and edit descriptors enclosed in parentheses. sn Is a field separator (a comma or slash). A comma can be omitted in the following cases: o Between a P edit descriptor and an immediately following F, E, D, or G edit descriptor. o Before or after a slash (/) record terminator. o Before or after a colon (:) edit descriptor. The "field descriptor" has one of the following forms: [r]c [r]cw [r]cw.m [r]cw.d[Ee] r Is the optional repeat count. (If you omit r, the repeat count is assumed to be 1.) c Is a format code (I,O,Z,F,E,D,G,L, or A). w Is the external field width in characters. Each data item in the external medium is called an external field. m Is the minimum number of characters that must appear in the field (including leading zeros). d Is the number of characters to the right of the decimal point. E Is an exponent field. e Is the number of characters in the exponent. The terms "r", "w", "m" and "d" must all be unsigned integer constants or variable format expressions. A variable format expression is an integer variable or expression enclosed in angle brackets that takes the place of an integer constant. The value of the variable or variables can change during program execution. The values of "r" and "w" must be in the range of 1 through 32767 (2**15-1), the values of "m" and "d" must be in the range of 0 through 255 (2**8-1), and "e" must be in the range of 1 through 255 (2**8-1). You cannot use PARAMETER constants for the terms "r", "w", "m", "d", or "e". The "edit descriptor" has one of the following forms: c [n]c c[n] c Is a format code (X,T,TL,TR,SP,SS,S,BN,BZ,P,H,Q,'...' $, or :). n Is the optional number of characters or character positions. The term "n" must be an unsigned integer constant (for format code P, it can be signed or unsigned) or a variable format expression. A variable format expression is an integer variable or expression enclosed in angle brackets that takes the place of an integer constant. The value of the variable or variables can change during program execution. The value of "n" for P must be within the range -128 to 127. For all other format codes, the value of "n" must be within the range 1 through 65535 (2**16-1); above 65535, the value truncates to 16 bits. Note that if you write to a record, it must be able to accommodate the size of "n". For more detail see Format_Specifiers.
|