ibec_fs_Eof

Tests whether the file position is at the end of a file.

Syntax

  function ibec_fs_Eof(FileHandle : variant): Boolean;

Description

The ibec_fs_Eof function tests whether the file position is at the end of a file. ibec_fs_Eof returns True if the current file position is beyond the last character of the file or if the file is empty; otherwise, ibec_fs_Eof returns False.

This function now supports files larger than 2 GB.

Example

  execute IBEBlock
  returns (vcout varchar(1000))
  as
  begin
    FileName = 'C:\mydata.csv';
    FH = ibec_fs_OpenFile(FileName, __fmOpenRead);
    if (not FH is NULL) then
    begin
      while (not ibec_fs_Eof(FH)) do
      begin
        vcout = ibec_fs_Readln(FH);
        suspend;
      end
      ibec_fs_CloseFile(FH);
    end
  end

See also:
Example: Importing data from a CSV file

back to top of page
<< ibec_fs_CloseFile | IBEBlock | ibec_fs_OpenFile >>