Intel® Fortran Compiler 18.0 Developer Guide and Reference

Z Editing

The Z data edit descriptor transfers hexadecimal (base 16) values. It takes the following form:

Zw[.m]

The value of m (the minimum number of digits in the constant) must not exceed the value of w (the field width), unless w is zero. The m has no effect on input, only output.

The specified I/O list item can be of type integer, real, or logical.

Rules for Input Processing

On input, the Z data edit descriptor transfers w characters from an external field and assigns their hexadecimal value to the corresponding I/O list item. The external field must contain only hexadecimal digits (0 though 9 and A (a) through F(f)) or blanks. w must not be zero.

If the value exceeds the range of the corresponding input list item, an error occurs.

The following shows input using the Z edit descriptor:

Format    Input              Value
Z3        A94                 2708
Z5        A23DEF            664542
Z5        95.AF2        An error; the decimal point is invalid

Rules for Output Processing

On output, the Z data edit descriptor transfers the hexadecimal value of the corresponding I/O list item, right-justified, to an external field that is w characters long.

The field consists of zero or more blanks, followed by an unsigned integer constant (consisting of hexadecimal digits) with no leading zeros. A negative value is transferred in internal form without a leading minus sign.

If w is zero, the external field has the minimum number of characters necessary to represent the value. If both w and m are zero and the internal value is zero, the external field is one blank.

If m is specified, the unsigned integer constant must have at least m digits. If necessary, it is padded with leading zeros.

If m is zero, and the output list item has the value zero, the external field is filled with blanks.

The following shows output using the Z edit descriptor (the symbol ^ represents a nonprinting blank character):

Format      Value         Output
Z4           32767        7FFF
Z9          -32767        ^FFFF8001
Z2              16        10
Z4           -10.5        ****
Z3.3          2708        A94
Z6.4          2708        ^^0A94
Z0        14348303        DAF00F

See Also