•  Back 
  •  GEMDOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileFcreate()
Fopen()
Fclose()                                                             GEMDOS

Syntax

LONG Fclose( handle )
WORD handle;

Function      Fclose() closes the file specified.

Opcode        62 (0x3E)

Availability  All GEMDOS versions.

Parameters    handle is a valid WORD file handle which will be closed as
              a result of this call.

Binding       move.w   handle,-(sp)
              move.w   #$3E,-(sp)
              trap     #1
              addq.l   #4,sp

Return Value  Fclose() returns E_OK (0) if the file was closed
              successfully or EIHNDL (-37) if the handle given was
              invalid.

Caveats       Calling this function with an invalid file handle will crash
              the system on GEMDOS versions below 0.15. In addition,
              GEMDOS versions below 0.15 will become confused if you close
              a standard GEMDOS handle (0-5).

Comments      As of GEMDOS version 0.15, closing a standard GEMDOS handle
              (0-5) will simply reset it to its default BIOS state.

See Also      Fcreate(), Fopen()