Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
Guardian Native C Library Calls (f) fscanf(3)
NAME
fscanf - Converts formatted input read from an input stream
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
int fscanf(
FILE *stream,
const char *format
[,*pointer]...
);
PARAMETERS
stream Specifies the input stream.
format Specifies the format conversion.
pointer Points to the location to store the converted data.
DESCRIPTION
The fscanf( ) function reads character data, interprets it according to a format, and stores the con-
verted results into a specified memory location. The format parameter contains conversion
specifications used to interpret the input. The pointer parameter specifies where to store the inter-
preted data.
This function reads its input from the stream parameter.
If there are insufficient arguments in the input stream for format, the behavior is undefined. If
format is exhausted while arguments remain, the excess arguments are evaluated as always but
are otherwise ignored.
The format parameter can contain the following items:
• A conversion specification that directs the conversion of the next input field. Conversion
specifications start with a % (percent sign).
• Any white-space character (as determined by the isspace() function) that matches 0
(zero) or more white-space characters in the input stream.
• Any character except % (percent sign) or a white-space character that must match the
next character in the input stream.
The input stream is broken into fields based on the following:
• White space—all conversion specifications except %c, %C, and %[scanset] ignore
leading white space and consider the first trailing white-space character to delimit the
field.
• Invalid character—if the input stream contains a character that is not allowed, this
invalid character delimits the field and is considered the first character of the next field.
527192-007 Hewlett-Packard Company 2−89