Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

O Editing

The O data edit descriptor transfers octal (base 8) values. It takes the following form:

Ow[.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 O data edit descriptor transfers w characters from an external field and assigns their octal value to the corresponding I/O list item. The external field must contain only octal digits (0 through 7) 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 O edit descriptor (the symbol ^ represents a nonprinting blank character):

Format    Input         Value
O5        77777               32767
O4        77777                4095
O3        97^           An error; the 9 is invalid in octal notation

Rules for Output Processing

On output, the O data edit descriptor transfers the octal 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 octal 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 O edit descriptor (the symbol ^ represents a nonprinting blank character):

Format     Value         Output
O6          32767        ^77777
O12        -32767        ^37777700001
O2          14261        **
O4             27        ^^33
O5           10.5        41050
O4.2            7        ^^07
O4.4            7        0007
O0             83        123