Harbour Reference Guide

 

HB_FEOF()

Check for end-of-file.

Syntax

HB_FEOF( <nHandle> ) --> lIsEof

Arguments

<nHandle> The handle of an open file.

Returns

<lIsEof> .T. if the file handle is at end-of-file, otherwise .F.

Description

This function checks an open file handle to see if it is at E-O-F.

If the file handle is missing, not numeric, or not open, then this function returns .T. and sets the value returned by FERROR() to -1 (FS_ERROR) or a C-compiler dependent errno value (EBADF or EINVAL).
Examples
      nH:=FOPEN('FILE.TXT')
      ? FREADSTR(nH,80)
      IF HB_FEOF(nH)
         ? 'End-of-file reached.'
      ELSE
         ? FREADSTR(nH,80)
      ENDIF
Status

Ready

Compliance

This function is a Harbour extension

Files

Library is rtl

See Also

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/07/30