Summary of the Descriptors [ HP FORTRAN 77/iX Programmer's Guide ] MPE/iX 5.0 Documentation
HP FORTRAN 77/iX Programmer's Guide
Summary of the Descriptors
The format descriptors, which describe the data, are summarized in Table
2-1 .
Table 2-1. Summary of the Format Descriptors
---------------------------------------------------------------------------------------------
| | | | |
| Data Conversion | Format | Forms | Data Declarations Allowed |
| Type | Descriptor | | |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Character | A | A[w] | All data types |
| | R | R[w] | All data types |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Logical | L | L[w] | LOGICAL |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Real | D | D[w.d] | All numeric data types |
| | E | E[w.d[Ee]] | All numeric data types |
| | F | F[w.d] | All numeric data types |
| | G | G[w.d[Ee]] | All numeric data types |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Integer | I | I[w[.m]] | All numeric data types |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Monetary | M | M[w.d] | All numeric data types |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Numeration | N | N[w.d] | All numeric data types |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Octal | O | O[w[.m]] | Input: INTEGER |
| | K | K[w[.m]] | Output: All data types |
| | @ | @[w[.m]] | |
| | | | |
---------------------------------------------------------------------------------------------
| | | | |
| Hexadecimal | Z | Z[w[.m]] | Input: INTEGER |
| | | | Output: All data types |
| | | | |
---------------------------------------------------------------------------------------------
In the table above,
w is the field width *
d is the digits to the right of the decimal point *
m is the minimum digits to be output (if omitted, m = 1)
e is the number of digits of the exponent (if omitted, e = 2)
* The default values are described in the HP FORTRAN 77/iX Reference.
NOTE In Table 2-1 :
"All numeric data types" implies LOGICAL*1, LOGICAL*2, LOGICAL*4,
INTEGER*2, INTEGER*4, REAL*4, REAL*8, REAL*16, COMPLEX*8, and
COMPLEX*16.
"INTEGER" implies INTEGER*2 and INTEGER*4.
"LOGICAL" implies LOGICAL*1, LOGICAL*2, and LOGICAL*4.
The edit descriptors control the positioning and formatting of numeric,
Hollerith, and logical fields on input and output lines. The edit
descriptors do not cause data conversions and, with the exception of the
Q descriptor, are not associated with the variables on the READ, WRITE,
or PRINT statements. The edit descriptors are summarized in Table 2-2
, where n represents a positive, nonzero number.
Table 2-2. Summary of the Edit Descriptors
-----------------------------------------------------------------------------------
| | | | |
| When Used | Edit | Descriptor | Description |
| | Descriptor | Type | |
| | | | |
-----------------------------------------------------------------------------------
| | | | |
| Input | BN | Numeric | Ignore blanks in input field |
| | | | |
| | BZ | Numeric | Treat blanks as zeros |
| | | | |
| | Q | Integer | Returns the number of remaining |
| | | | bytes on the input record |
| | | | |
-----------------------------------------------------------------------------------
| | | | |
| Output | NL | Prompt | Cursor moves to a new line* |
| | | | |
| | NN or $ | Prompt | Cursor remains on the same line* |
| | | | |
| | S | Numeric | Plus sign (+) suppressed |
| | | | |
| | SP | Numeric | Plus sign (+) printed |
| | | | |
| | SS | Numeric | Plus sign (+) suppressed |
| | | | |
| | " | Character | Writes character constant |
| | | | |
| | ' | Character | Writes character constant |
| | | | |
| | nH | Character | Outputs character strings |
| | | | |
-----------------------------------------------------------------------------------
| | | | |
| Input/Output | nP | Scale factor | Modifies input/output of the Ew.d,
| | | | Dw.d, and Gw.d descriptors and |
| | | | output of the Fw.d descriptor |
| | | | |
| | nX | Position edit | Skips n positions |
| | | | |
| | Tn | Tab edit | Positions to column n |
| | | | |
| | TLn | Tab edit | Positions backward n columns |
| | | | |
| | TRn | Tab edit | Positions forward n columns |
| | | | |
| | : | Format control | Terminates format if no more items
| | | | are in the I/O list |
| | | | |
| | / | Line terminator| Begins processing a new line |
| | | | |
-----------------------------------------------------------------------------------
* See the HP FORTRAN 77/iX Reference for details.
The input descriptors are ignored on output. The output descriptors are
ignored on input, except that nH, ", and ' are treated as nX, where n is
the length of the string.
MPE/iX 5.0 Documentation