Contents Previous Next Subchapters

Detecting End of File
Syntax eof(file_name)
See Also read , write , close

Description
Returns true, if there are no characters past the current read location marker for the specified file and false otherwise, where file_name is a character row vector.

Example
If the file temp.dat is located in the current working directory and contains
     1 0
     0 1
and you enter
     f = "temp.dat"
     while not eof(f) begin
          print read(f, "int")
     end
O-Matrix will respond
     [ 0 , 1 ]
     [ 1 , 0 ]