With the READ procedure, the type of a number on a data card does not have to be the same as the type of the variable to which it is assigned. Any necessary type conversions are done automatically. If N is the next number in the data, the statement

The data cards are free field. The number of values per card, the length of numbers, and the number of spaces are arbitrary. A comma, however, must follow each number, including the last one on the last data card.

The Oak Ridge ALGOL Compiler for the Control Data Corporation 1604 — Part 5

In reading a value into a subscripted variable, the current value of the subscript expression is not affected by that READ statement. For example, in the statement

The Oak Ridge ALGOL Compiler for the Control Data Corporation 1604 — Part 5

The READ procedure will input data from the standard input medium only.

The Oak Ridge ALGOL Compiler for the Control Data Corporation 1604 — Part 5

The PAGE procedure is used to cause a page ejection on the standard output medium. PAGE has no parameters. It is called by simply writing

The input and output procedures described in the rest of this section, as well as the binary read and write procedures, make use of the concept of a list. A list[1] is a sequence of expressions. An example is

It may be inconvenient in some cases to write down all of the expressions explicitly. The loop expression[1] may be used as a shorthand device in a list. It is an Algol-like construction of which the following is an example:

The entity following do in a loop expression may itself be a list, but this list must be enclosed in parentheses if it contains more than one member.

for I := 1 step 1 until 1000 do (A[I], B[I])

A[1], B[1], A[2], B[2], ..., A[1000], B[1000] .

for I := 1 step 1 until 10 do (A[I], for J := 1 step 1 until 20 do B[I,J])

A[1], B[1,1], B[1,2], ..., B[1,20], A[2], B[2,1], B[2,2], ..., B[2,20], .................................... A[10], B[10,1], B[10,2], ..., B[10,20] .

A list may be given a name through a list declaration. A list declaration has the form

list M := for I := 1 step 1 until N do A[I] .

A list identifier may itself appear in a list. One of the above examples might be written with the aid of the following declaration:

list L := for J := 1 step 1 until 20 do B[I,J] .

A list declaration obeys the same rules of syntax and scope as do other declarations.

A list identifier may be used as an actual parameter of a procedure call, with the requirement that the corresponding formal parameter be specified list. However, an actual list may appear as a parameter only in calls of the standard procedures, as described.