< previous page page_685 next page >

Page 685
0685-01.gif
Figure 12-9
Data Structures for Exam Program
Main Level 0
Open roster file for input
IF file could not be opened
   Terminate program
Get class roster
Check in students
Print lists

To open the input file, we'll make our program more flexible by prompting the user for a file name and reading it in as a string.
Open For Input (Inout: someFile) Level 1
Prompt user for name of disk file
Read fileName
Associate fileName with stream someFile,
  and try to open it
IF file could not be opened
  Print error message

 
< previous page page_685 next page >