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

Guardian Native C Library Calls (f) fprintf(3)
NAME
fprintf - Prints formatted output to an output 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 fprintf (
FILE *stream,
const char *format
[, value]...
);
PARAMETERS
stream Points to a FILE structure specifying an open stream to which converted values
will be written.
format Species a character string combining literal characters with conversion
specications.
value Species the data to be converted according to the format parameter.
DESCRIPTION
The fprintf( ) function converts, formats, and writes its value parameters, under control of the
format parameter, to the output stream specied by its stream parameter.
The format parameter is a character string that contains two types of objects:
Literal characters, which are copied to the output stream.
Conversion specications, each of which causes zero or more items to be fetched from
the value parameter list.
If there are not enough items for format in the value parameter list, the results are unpredictable.
If more values remain after the entire format has been processed, they are ignored.
Conversion Specications
Each conversion specication in the format parameter has the following syntax:
A % (percent sign).
The fprintf( ) function can handle a format string that enables the system to process ele-
ments of the parameter list in variable order. In such a case, the normal conversion char-
acter % (percent sign) is replaced by %digit$, where digit is a decimal number in the
range from 1 to NL_ARGMAX. Conversion is then applied to the specied argument,
rather than to the next unused argument. This feature provides for the denition of for-
mat strings in an order appropriate to specic languages. When variable ordering is
used, the * (asterisk) specication for eld width in precision is replaced by %digit$.If
the variable ordering feature is used, it must be specied for all conversions.
Zero or more ags that modify the meaning of the conversion specication. The ag
characters and their meanings are as follows:
- Left align within the eld the result of the conversion.
527192-005 Hewlett-Packard Company 241