-

Functions HI-TECH C GETW

From HI-TECH C for CP/M Fan WIKI(EN)
Revision as of 20:26, 31 July 2017 by Kumokosi (talk | contribs) (Created page with "<strong>GETW</strong> ==SYNOPSIS== #include <stdio.h> int getw(FILE * stream) ==DESCRIPTION== <strong>Getw</strong>() returns one word (16 bits for the Z80 and 8086)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

GETW

SYNOPSIS

#include  <stdio.h>

int getw(FILE * stream)


DESCRIPTION

Getw() returns one word (16 bits for the Z80 and 8086) from the nominated stream. EOF is returned on end-of-file, but since this is a perfectly good word, the feof() macro should be used for testing for end-of- file. When reading the word, no special alignment in the file is necessary, as the read is done by two consecutive getc()'s. The byte ordering is however undefined. The word read should in general have been written by putw().

SEE ALSO

putw, getc, fopen, fclose