FORTRAN 77 Language Reference

Description

The entities in the I/O list can be: variables, substrings, arrays, array elements, record fields. A simple unsubscripted array name specifies all of the elements of the array in memory storage order, with the leftmost subscript increasing more rapidly.

Execution proceeds as follows:

  1. The ENCODE statement translates the list items to character form according to the format identifier, and stores the characters in buf. A WRITE operation on internal files does the same.

  2. The DECODE statement translates the character data in buf to internal (binary) form according to the format identifier, and stores the items in the list. A READ statement does the same.

  3. If buf is an array, its elements are processed in the order of subscript progression, with the leftmost subscript increasing more rapidly.

  4. The number of characters that an ENCODE or a DECODE statement can process depends on the data type of buf. For example, an INTEGER*2 array can contain two characters per element, so that the maximum number of characters is twice the number of elements in that array. A character variable or character array element can contain characters equal in number to its length. A character array can contain characters equal in number to the length of each element multiplied by the number of elements.

  5. The interaction between the format identifier and the I/O list is the same as for a formatted I/O statement.