Answer

First look at the WRITE statement inside the DO loop. In the original version of the program, we wrote to unit 6 according to the FORMAT statement 200. In the new version, we write to unit 8.

Recall that unit 6 (by default) is the display. But what is unit 8? Look above the DO loop, and you will see the statement

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

What this says is to use the file 'filename' as unit 8. After this statement is executed, when we write from unit 8 we are writing to the file 'filename'.

Return to lesson.



Hamlet Project
hamlet@cs.utah.edu