The Function EOF() that is used to check for the end of the file during the reading process.The EOF() function will return a value of false (0) if there are more records in the file,or it will return a value of true (1) if the end of the file has been encountred.Therefore,the EOF () function is actually evaluated like a Boolean expression.The argument send into the EOF() function will be the buffer number of the fle being manipulated.Because the EOF() is a Boolean expression that returns a value of true or false,it is an efficent way of controlling the excution of a loop during reading data from a file.For example,consider:
10 WHILE NOT EOF(1)
20 INPUT #1,stuName,gpa,grade
30 PRINT"STUDENT:";stuName;spc(5);gpa;SPC(5);grade
40 While