basic.%close
Closes a Unix file.
Syntax
variable=%close(file.descriptor)
Description
closes the Unix file specified by 'file.descriptor' returned by a previous call to %open(), %creat(), %dup(), %socket() or %accept().
All Unix files opened from a FlashBASIC or Pick/BASIC program are closed automatically at main program termination. It is a safe practice, though, to close files explicitly.
Example
if %close(fd) then
crt 'Cannot close file'
stop
end
Note the use of the implicit (void) casting by not including the statement as
part of an assignment. The return code of the close is thrown away.
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
