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

Guardian Native C Library Calls (s) sscanf(3)
A conversion code character convcode that species the type of conversion to be
applied:
% Accepts a single % (percent sign) input at this point; no assignment is
done.
c Accepts a single character or a series of characters. If there is either no
width or a width of 1 in the conversion specication, one character is
accepted and the corresponding pointer parameter should be a type char
pointer. If there is a width greater than 1, the indicated number of char-
acters are accepted and the pointer parameter should be an array of type
char.
The normal skip over white space is suppressed. Use %1s rather than
%1c to read the next non-white-space character.
C Accepts a single character or a series of characters and converts to
wchar_t type.
If there is either no width or a width of 1 in the conversion specication,
one character is accepted and the corresponding pointer parameter
should be a type wchar_t pointer. If there is a width greater than 1, the
indicated number of characters are accepted and the corresponding
pointer parameter should be an array of type wchar_t.
The normal skip over white space is suppressed. Use %1S rather than
%1C to read the next non-white-space character.
d Accepts a decimal integer; the corresponding pointer parameter should
be an integer pointer.
e, f, g Accepts a oating-point number. The next eld is converted accord-
ingly and stored through the corresponding pointer parameter, which
should be a pointer to a oat. The input format for oating-point
numbers is a string of digits with the following optional characteristics:
It can be a signed value.
It can be an exponential value, containing a decimal point fol-
lowed by an exponent eld, which consists of an E or e followed
by an optionally signed integer.
i Accepts a decimal integer unless:
The rst digit is a 0 (zero), in which case the integer is inter-
preted as an octal number.
The rst two characters are 0x or 0X, in which case the integer is
interpreted as a hexadecimal number.
The corresponding pointer parameter should be an integer pointer.
n Consumes no input. The corresponding pointer parameter is a pointer to
an integer into which is written the number of characters read from the
input string so far by this function. The assignment count returned at the
completion of this function is not incremented.
527192-005 Hewlett-Packard Company 643