User Tools

Site Tools


close_close_the_file_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== Close (close the file) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Close, VIRTUAL, PROC

blk2blue.jpg

The Close method tells the FileManager the calling procedure is done with the file, then closes the file if no other procedure is using it. The Close method handles any errors that occur while closing the file.

Implementation:

The Close method returns a value of Level:Benign (EQUATE declared in ABERROR.INC). See Error Class for more information on Level:Benign and other severity levels.

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

Init      PROCEDURE               !prototype Access:File init

             END

Client    FILE,DRIVER('TOPSPEED'),PRE(CLI),CREATE,BINDABLE,THREAD

!file declaration

         END

CODE

GlobalErrors.Init                !initialize GlobalErrors object

Access:Client.Init               !initialize Access:Client object

Access:Client.Open               !open the Client file

!program code

Access:Client.Close              !close the Client file

Access:Client.Kill               !shut down the Access:Client object

GlobalErrors.Kill                !shut down the GlobalErrors object

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