7.3.1.2 List-Directed Sequential WRITE Statement

The list-directed sequential WRITE statement performs the following operations:

The values transferred as output by the list-directed WRITE statement have the same forms as those of constant values transferred as input by the list-directed READ statement, with the following exceptions:

Consequently, records containing list-directed character output data can be printed but not used for list-directed input.

Table 7-1 shows the default output formats for each data type.

Table 7-1 List-Directed Default Output Formats

Data Type  Output Format 
BYTE  I5 
LOGICAL*1  L2[1] or I5[2] 
LOGICAL*2  L2 
LOGICAL*4  L2 
LOGICAL*8[1]  L2 
INTEGER*1  I5 
INTEGER*2  I7 
INTEGER*4  I12 
INTEGER*8[1]  I22 
REAL*4  1PG15.7E2 
REAL*8 (T_floating)[1]  1PG24.15E3 
REAL*8 (D_floating)[3]  1PG24.16E2 
REAL*8 (G_floating)[3]  1PG24.15E3 
REAL*16[4]  1PG43.33E4 
COMPLEX*8  '(',1PG14.7E2, ',', 1PG14.7E2,')' 
COMPLEX*16 (T_floating)[1]   '(',1PG23.15E3,',',1PG23.15E3,')' 
COMPLEX*16 (D_floating)[3]   '(',1PG23.16E2,',',1PG23.16E2,')' 
COMPLEX*16 (G_floating)[3]   '(',1PG23.15E3,',',1PG23.15E3,')' 
CHARACTER  An[5] 

[1] Alpha only
[2] VAX only
[3] VMS only
[4] VMS, U*X
[5] Where n is the length of the character expression

List-directed output formats behave in the following ways:

Example

The following example illustrates a valid list-directed WRITE statement:

DIMENSION A(4)
DATA A/4*3.4/
WRITE (1,*) 'ARRAY VALUES FOLLOW'
WRITE (1,*) A,4

In this example, the WRITE statements write the following records to logical unit 1:

ARRAY VALUES FOLLOW
   3.400000      3.400000      3.400000      3.400000      4

For More Information:

For details on list-directed value forms, see Section 7.2.1.2.


Previous Page Next Page Table of Contents