Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (s) sscanf(3)
NAME
sscanf - Converts formatted input read from a character string
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 sscanf(
const char *string,
const char *format
[,*pointer]...
);
PARAMETERS
string Species the input string to be read.
format Species the format conversion.
pointer Points to the location to store the converted data.
DESCRIPTION
The sscanf() function reads character data, interprets it according to a format, and stores the con-
verted results into a specied memory location. The format parameter contains conversion
specications used to interpret the input. The pointer parameter species where to store the inter-
preted data.
This function reads its input from the character string specied by the string parameter.
In the TNS environment, the sscanf() function supports only the C/POSIX locale. Thus, any
conversion specications that are locale-dependent do not function correctly in locales other than
the C/POSIX locale. In the native environment, the sscanf() function supports all locales.
If there are insufcient arguments in the input string for format, the behavior is undened. If for-
mat 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 specication that directs the conversion of the next input eld. Conversion
specications 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 string.
Any character except % (percent sign) or a white-space character that must match the
next character in the input string.
The input string is broken into elds based on the following:
White spaceall conversion specications except %c, %C, and %[scanset] ignore
leading white space and consider the rst trailing white-space character to delimit the
eld.
527192-007 Hewlett-Packard Company 645