The slash edit descriptor indicates the end of data transfer on the current record. The repeat specifier (r) has a default value of 1.
When you connect a file for input using sequential access, each slash edit descriptor positions the file at the beginning of the next record.
When you connect a file for output using sequential access, each slash edit descriptor creates a new record and positions the file to write at the start of the new record.
When you connect a file for input or output using direct access, each slash edit descriptor increases the record number by one, and positions the file at the beginning of the record that has that record number.
When you connect a file for input using stream access, each slash edit descriptor positions the file at the beginning of the next record, skipping the remaining portion of the current record. On output to a file connected for stream access, a newly created empty record follows the current record. The new record becomes both the current and last record of the file, with the file position coming at the beginning of the new record.
500 FORMAT(F6.2 / 2F6.2) 100 FORMAT(3/)
The colon edit descriptor terminates format control if no more items are in the input/output list. If more items are in the input/output list when the colon is encountered, it is ignored.
See Interaction of Input/Output lists and format specifications for more information.
10 FORMAT(3(:'Array Value',F10.5)/)
The dollar edit descriptor inhibits an end-of-record for a sequential or formatted stream WRITE statement.
Usually, when the end of a format specification is reached, data transmission of the current record ceases and the file is positioned so that the next input/output operation processes a new record. But, if a dollar sign occurs in the format specification, the automatic end-of-record action is suppressed. Subsequent input/output statements can continue writing to the same record.
A common use for dollar sign editing is to prompt for a response and read the answer from the same line.
WRITE(*,FMT='($,A)')'Enter your age ' READ(*,FMT='(BN,I3)')IAGE WRITE(*,FMT=1000) 1000 FORMAT('Enter your height: ',$) READ(*,FMT='(F6.2)')HEIGHT
The BN and BZ edit descriptors control the interpretation of nonleading blanks by subsequently processed I, F, E, EN, ES, D, G, B, O, Z, and extended precision Q edit descriptors. BN and BZ have effect only on input.
BN specifies that blanks in numeric input fields are to be ignored, and remaining characters are to be interpreted as though they were right-justified. A field of all blanks has a value of zero.
BZ specifies that nonleading blanks in numeric input fields are to be interpreted as zeros.
The initial setting for blank interpretation is determined by the BLANK= specifier of the OPEN statement. (See OPEN.) The initial setting is determined as follows:
The initial setting for blank interpretation takes effect at the start of a formatted READ statement and stays in effect until a BN or BZ edit descriptor is encountered or until format control finishes. Whenever a BN or BZ edit descriptor is encountered, the new setting stays in effect until another BN or BZ edit descriptor is encountered, or until format control terminates.
If you specify the oldboz suboption of the -qxlf77 compiler option, the BN and BZ edit descriptors do not affect data input edited with the B, O, or Z edit descriptors. Blanks are interpreted as zeros.
The scale factor, k, applies to all subsequently processed F, E, EN, ES, D, G, and extended precision Q edit descriptors until another scale factor is encountered or until format control terminates. The value of k is zero at the beginning of each input/output statement. It is an optionally signed integer value representing a power of ten.
On input, when an input field using an F, E, EN, ES, D, G, or extended precision Q edit descriptor contains an exponent, the scale factor is ignored. Otherwise, the internal value equals the external value multiplied by 10(-k).
On output:
Input Format Value 98.765 3P,F8.6 .98765E-1 98.765 -3P,F8.6 98765. .98765E+2 3P,F10.5 .98765E+2
Value Format Output Output (with -qxlf77=noleadzero) (with -qxlf77=leadzero) 5.67 -3P,F7.2 bbbb.01 bbb0.01 12.34 -2P,F6.4 b.1234 0.1234 12.34 2P,E10.3 b12.34E+00 b12.34E+00
The S, SP, and SS edit descriptors control the output of plus signs by all subsequently processed I, F, E, EN, ES, D, G, and extended precision Q edit descriptors until another S, SP, or SS edit descriptor is encountered or until format control terminates.
S and SS specify that plus signs are not to be written. (They produce identical results.) SP specifies that plus signs are to be written.
Value Format Output 12.3456 S,F8.4 b12.3456 12.3456 SS,F8.4 b12.3456 12.3456 SP,F8.4 +12.3456
The T, TL, TR, and X edit descriptors specify the position where the transfer of the next character to or from a record starts.
The T and TL edit descriptors use the left tab limit for file positioning. Immediately before data transfer the definition of the left tab limit is the character position of the current record or the current position of the stream file. The T, TL, TR, and X specify the character position as follows:
The TR and X edit descriptors give identical results.
On input, a TR or X edit descriptor can specify a position beyond the last character of the record if no characters are transferred from that position.
On output, a T, TL, TR, or X edit descriptor does not by itself cause characters to be transferred. If characters are transferred to positions at or after the position specified by the edit descriptor, positions skipped and previously unfilled are filled with blanks. The result is the same as if the entire record were initially filled with blanks.
On output, a T, TL, TR, or X edit descriptor can result in repositioning so that subsequent editing with other edit descriptors causes character replacement.
The X edit descriptor can be specified without a character position. It is treated as 1X. When the source file is compiled with -qlanglvl=90std or -qlanglvl=95std, this extension is disabled in all compile-time format specifications, and the form of oX is enforced. To disable this extension in run-time formats, the following run-time option must be set:
XLFRTEOPTS="langlvl=90std" or "langlvl=95std" ; export XLFRTEOPTS