8.3.2.5 Complex Editing

A complex value is an ordered pair of real values. Therefore, input or output of a complex value is governed by two real field descriptors, using any combination of the forms Fw.d, Ew.d[Ee], Dw.d, or Gw.d[Ee].

Input Processing

In an input statement, the two successive fields are read and assigned to a complex I/O list element as its real and imaginary parts, respectively.

The following list illustrates valid input processing using complex data editing:

Format         External Field       Internal Value
F8.5,F8.5      1234567812345.67     123.45678, 12345.67
E9.1,F9.3      734.432E8123456789   734.432E8, 123456.789

Output Processing

In an output statement, the two parts of a complex value are transferred under the control of repeated or successive field descriptors. The two parts are transferred consecutively without punctuation or spacing unless the format specifier states otherwise.

The following list illustrates valid output processing using complex data editing (the symbol ^ represents a nonprinting space character):

Format              Internal Value           External Representation
2F8.5               2.3547188, 3.456732      ^2.35472 ^3.45673
E9.2,'^,^',E5.3     47587.222, 56.123        ^0.48E+06^,^*****


Previous Page Next Page Table of Contents