PUTW - output a word.

(Compatible with UNIX System V C)

Usage:

#include <stdio.h>
i = putw( w, f );

Where:

int w;
is the machine word to be output.
FILE *f;
points to the output file.
int i;
is the word that was put out unless there was an I/O error, in which case EOF is returned.

Description:

"putw" outputs a word to the indicated file. It returns "w" unless there was an output error, in which case it returns EOF. Since EOF is a valid integer value, you should use "feof" to make sure that the EOF you receive is not just an output value.

Note that "putw" neither assumes nor causes any special alignment in the file.

See Also:

expl c lib feof

expl c lib getw

Copyright © 1996, Thinkage Ltd.