GETBIN - read vector of binary data from sequential file.
Alternate Entry Name: GT.BIN
Usage:
B:
size = getbin( [ unit, ] vector [, limit ] );
C:
int getbin([FILE *unit,] void *vector [, int limit] );
Where:
- unit
- is the number of an input unit. If not specified, the
default is the current read unit.
- vector
- points to an area of memory into which the data is to be
read.
- limit
- specifies the maximum allowable index of
"vector". Since this is one less than the total
number of words the vector can hold, GETBIN will read a
maximum of "limit"~+~1 words. If
"limit" is not specified, there will be no
maximum. If "limit" causes the truncation of a
vector, the excess is discarded.
- size
- is the size of the vector of data which has been read in.
This size is the maximum value an index to the vector can
take, and is thus one less than the actual number of
words in the vector. If an error occurs during the read
action, a negative error number (ERRNO) is returned
instead of the vector size. Some possible causes of
errors are
unit not open
not a read unit
unit at end of file
Description:
GETBIN is intended for reading sequential files in system
standard format, the records of which are vectors of binary data
presumably written by calls to PUTBIN. At each call to GETBIN,
the next sequential vector is read.
See Also:
expl b lib putbin
Copyright © 1996, Thinkage Ltd.