PUTBIN - write vector of binary data to sequential file.
Alternate Entry Name: .PTBIN
Usage:
B:
status = putbin( [ unit, ] vector, size );
C:
int putbin( [FILE *unit,] const void *vector, int size);
Where:
- unit
- is the number of an open output unit. If "unit"
is not specified, the default is the current write unit.
- vector
- points to a vector containing the data which is to be
written out.
- size
- is the size of the maximum index of "vector".
This is one less than the actual number of words
allocated to "vector".
- status
- is zero if the write operation is successful. Otherwise,
"status" receives a negative number. Some of
the possible causes of error are
- unit not open
- not a write unit
- not a file (e.g. tty or console)
- unable to grow file - Since the program generally
aborts when this happens, you will not normally
see this error. The one exception occurs when the
file was opened with the specification that your
program retained control after file I/O errors
(see "expl b lib
open").
Description:
PUTBIN writes out the contents of a binary vector to a file in
system standard format. Note that it is impossible to handle a
null vector (true length zero).
See Also:
expl b lib getbin
expl b lib putrec
Copyright © 1996, Thinkage Ltd.