21•• To find the data endWhat would happen if the data being read-out in order from the file surpass thenumber of data registered? In this case, an error does not occur. And a zero or blankis set in the read-out variable, but there is a special function EOF (#n) (page 56)which can detect the data end. When there is a data read-out by an INPUT command,EOF (#n) becomes a true condition when there is no data.As a result, if theIF EOF (#n) THENcommand is placed after the INPUT # command, then if EOF (#n) becomes "true",i.e. if the end of the data is found, the command after THEN will be executed.Here use the practice problems to become sufficiently accustomed to the use of theBSD file.Practice problemsProblem 1Using the program example on the previous page, change the program assuming thatthe number of people registered is unknown, read-out the file 10 persons at a timeuntil the end of the file is reached and display them.Example solutionThe following program might, for example, be considered.300 ROPEN #5, " F D1 ADDRESS LI ST"3 1 0 FOR I =1 TO 1 0320 INPUT #5, NA$, AD$330 I F E OF ( #5) THEN 400350 NEXT360 PRI NT " PUSH SPACE KEY"370 GET X$: I F X$ THEN 310380 GOTO 370400 CLOSE #5410 PRI NT " F I LE END" : END