<< fclose stream manager ferror >>

feof


Checks end of file.


Syntax


status = feof(fid)

Input argument


fid

a file descriptor

Output argument


status

an integer value: 1 if file is closed or 0 if not.

Description


feof checks if end of file has been reached.

Example


fid = fopen([nelsonroot(), '/etc/startup.nls'], 'rt');
feof(fid)
while ~feof(fid)
  tline = fgetl(fid);
  disp(tline);
end
feof(fid)
fclose(fid);

See also


fopen, fgetl.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< fclose stream manager ferror >>