FSCANF - formatted input conversion.

(ANSI Standard)

Usage:

#include <stdio.h>
ret = fscanf( f, format [, p1, p2, ...] );

Where:

FILE *f;
points to the file which is to be read.
const char *format;
is a format string similar to that for "scanf".
p1, p2, p3, ...
are pointers to various data types.
int ret;
is the number of matching data items that were read in. This may be zero if the first data item found does not match the type that was expected. If an error or end of file occurs before the first item could be read in, EOF is returned.

Description:

"fscanf" reads input from the file pointed to by "f" and assigns it to the areas of memory pointed to by the pointers "p1", "p2", and so on. The string pointed to by "format" indicates how to interpret the characters being read in. For a full description of the interpretation symbols used by "fscanf", see the documentation for "scanf".

See Also:

expl c lib scanf

expl c lib sscanf

expl c lib printf

Copyright © 1996, Thinkage Ltd.