User Tools

Site Tools


geteof_return_end_of_file_status_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== GetEOF (return end of file status) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

GetEOF

blk2blue.jpg

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

TipBox.jpg

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

geteof_return_end_of_file_status_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1