basic.%close.apdos

C Function/BASIC Program, Releases: AP/DOS

Closes an MS-DOS file.

Syntax

rc = %close(file.handle)

Description

closes an MS-DOS file specified by the 'file.handle' returned by a previous call to '%open()'.

For more information, refer to the MS-C library reference manual under CLOSE(). All MS-DOS files must be explicitly closed, since files are not automatically closed at program termination. Closing one of the system files (stdin, stdout, etc.) has unpredictable results.

Should an error condition arise within this C function, the 'system(0)' function contains the associated error message number.

See Also

Command Name Type Description
basic.cfunction Definition Declare a list of C functions.
basic.cfunc Definition can be called from a Pick/BASIC program or subroutine in AP/DOS and AP/Unix implementations using a syntax similar to that of normal C.
basic.system Function Displays status of system-controlled variables.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.