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

fscanf(3) Guardian Native C Library Calls Reference Manual
Maximum widthif the conversion specication includes a maximum width and the
eld is not terminated by white space or an invalid character, then when that maximum
width is reached in the input stream, the eld is terminated.
Conversion Specications
Each conversion specication in the format parameter has the following syntax:
%[digit$][*][width][sizecode]convcode
The character % (percent sign) or %digit$.
The fscanf( ) function can handle a format string that enables the system to process an
element of the input stream for storage at a specic pointer location. In such a case, the
normal conversion specier % (percent sign) is replaced by %digit$, where digit is a
decimal number in the range 1 through NL_ARGMAX. Conversion is then applied to
the element and the result is stored according to the pointer specied by digit, rather than
stored according to the next unused pointer.
This variable ordering feature provides for the denition of format strings in an order
appropriate to specic languages. If this feature is used, it must be specied for all
conversions in format except for conversion specications that do not have correspond-
ing pointers (that is, conversion specications with the * [asterisk] assignment suppres-
sion character and %% conversion specications).
If more than one conversion specication species the same value for digit, the results of
the function are undened.
The optional assignment suppression character * (asterisk).
An optional decimal digit string width that species the maximum eld width.
An optional sizecode indicating the size of the receiving variable for some values of
convcode. The sizecode can be h, l, ll,orL, as follows:
An h followed by a d, i, o, u,orx conversion code character indicates that the
receiving variable is treated as a short int or unsigned short int.
An l followed by a d, i, o, u,orx conversion code character indicates that the
receiving variable is treated as a long int or unsigned long int.
An l followed by an e, f,org conversion code character indicates that the receiv-
ing variable is treated as a double instead of a oat.
An ll followed by a d, i, o, u,orx conversion code character indicates that the
receiving variable is treated as a long long int or unsigned long long int.
An ll followed by an e, f,org conversion code character indicates that the
receiving variable is treated as a double instead of a oat.
An L followed by an e, f,org conversion code character indicates that the
receiving variable is treated as a long double.
An L followed by a d, i, n, o,orx conversion code character indicates that the
receiving variable is treated as a long long, which is a 64-bit integer data type.
290 Hewlett-Packard Company 527192-007