Tests the specified file unit for theend-of-file condition.
OpenVMS Users: Under OpenVMS, the EOF function has the following limitations:
OPENW, unit, 'eoffile.dat', /Get_Lun
; Open the file eoffile.dat for writing.
PRINTF, unit, 'This is' PRINTF, unit, 'some sample' PRINTF, unit, 'data.'
; Write some text to the file.
FREE_LUN, unit
; Close the file and free the associated unit number.
OPENR, unit, 'eoffile.dat', /Get_Lun
; Open the file eoffile.dat for reading.
a = ' '
; Define a string variable.
WHILE NOT eof(unit) DO BEGIN &$
READF, unit, a &$
PRINT, a &$
; Read data and print it until end-of-file.
ENDWHILE This is some sample data. FREE_LUN, unit
For information on opening files and choosing LUNs, see Opening and Closing Files of the PV-WAVE Programmer's Guide.