Difference between revisions of "BINCLOSE()"
From Lianjapedia
Helen.george (Talk | contribs) |
|||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to close a file opened for binary file access | Function to close a file opened for binary file access | ||
− | |||
==Syntax== | ==Syntax== | ||
BINCLOSE([<expN>]) | BINCLOSE([<expN>]) | ||
− | |||
==See Also== | ==See Also== | ||
[[BIN2I()]], [[BIN2L()]], [[BIN2W()]], [[BINCREATE()]], [[BINOPEN()]], [[BINREAD()]], [[BINSEEK()]], [[BINWRITE()]], [[FCLOSE()]], [[FOPEN()]], [[I2BIN()]], [[L2BIN()]] | [[BIN2I()]], [[BIN2L()]], [[BIN2W()]], [[BINCREATE()]], [[BINOPEN()]], [[BINREAD()]], [[BINSEEK()]], [[BINWRITE()]], [[FCLOSE()]], [[FOPEN()]], [[I2BIN()]], [[L2BIN()]] | ||
− | |||
==Description== | ==Description== | ||
The BINCLOSE() function is used to close a binary file which was opened with the BINCREATE() or BINOPEN() functions. Associated buffers are written to the disk as the file is closed. <expN> is the file descriptor returned when the file was opened with either the BINCREATE() or BINOPEN() functions. The binary conversion functions can be used in conjunction with all the binary file functions. | The BINCLOSE() function is used to close a binary file which was opened with the BINCREATE() or BINOPEN() functions. Associated buffers are written to the disk as the file is closed. <expN> is the file descriptor returned when the file was opened with either the BINCREATE() or BINOPEN() functions. The binary conversion functions can be used in conjunction with all the binary file functions. | ||
− | |||
==Example== | ==Example== | ||
Line 25: | Line 21: | ||
binclose(fd) | binclose(fd) | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== |
Revision as of 11:31, 11 December 2012
Purpose
Function to close a file opened for binary file access
Syntax
BINCLOSE([<expN>])
See Also
BIN2I(), BIN2L(), BIN2W(), BINCREATE(), BINOPEN(), BINREAD(), BINSEEK(), BINWRITE(), FCLOSE(), FOPEN(), I2BIN(), L2BIN()
Description
The BINCLOSE() function is used to close a binary file which was opened with the BINCREATE() or BINOPEN() functions. Associated buffers are written to the disk as the file is closed. <expN> is the file descriptor returned when the file was opened with either the BINCREATE() or BINOPEN() functions. The binary conversion functions can be used in conjunction with all the binary file functions.
Example
fd = binopen("file.obj") count = binread(fd, 4) count = bin2l(count) count = l2bin(count + 1) binseek(fd, 512, 0) binwrite(fd, count) binclose(fd)
Products
Lianja Server, Lianja