GetEOF (return end of file status)

Top  Previous  Next

 

GetEOF

The GetEOF method returns the current end of file status for the managed file.

GetEOF is designed to be used after a call to the Next or Previous method. The GetEOF return value is undefined prior to the call to Next or Previous.

Implementation:

GetEOF returns one (1 or True) if the last record in a Next/Previous series was read; otherwise it returns zero (0 or False).

Return Data Type:     BYTE

Example:

PROGRAM

INCLUDE('ABFILE.INC')            !declare FileManager class

MAP                              !program map

END

GlobalErrors ErrorClass           !declare GlobalErrors object

Access:Client CLASS(FileManager)  !derive Access:Client object

      END

CODE

!program code

LOOP                             !loop through client file

 CASE Access:Client.Next()       !get next record in sequence

 OF Level:Notify OROF Level:Fatal!if error occurred

  POST(Event:CloseWindow)        !shut down

  BREAK

 ELSE                            !otherwise

  PRINT(Rpt:Detail)              !print the record

 END

UNTIL Access:Client.GetEOF()     !stop looping at end of file

See Also:     Next, TryNext, Previous, TryPrevious