title: What is the purpose of "while eof(n)" in a qbasic program?
body: <p>Given this program code:</p>
  
  <pre><code>CLS
  OPEN "school.dat" FOR INPUT AS #5
  DO WHILE NOT EOF(5)
      INPUT #5,ID,N$,S$,PN$
      IF LEFT$(N$,1)="A" OR LEFT$(N$,1)="a" THEN
          PRINT ID,N$,S$,PN$
      END IF
  LOOP
  CLOSE#5
  END
  </code></pre>
  
  <p>I do not quite understand what is the use of <code>do while not eof(5)</code>? What will happen if that <code>eof(n)</code> syntax is removed? </p>