Answer

First look at the READ statement inside the DO loop. In the original version of the program, we read from unit 5 according to FORMAT statement 200. In the new version, we read from unit 7.

Recall that unit 5 (by default) is the keyboard. But what is unit 7? Look above the DO loop, and you will see the statement

OPEN(UNIT=7, FILE='filename')

What this says is to use the file 'filename' as unit 7. After this statement is executed, when we read from unit 7 we are reading from the file 'filename'.

Return to lesson.



Hamlet Project
hamlet@cs.utah.edu