
UM017105-0511 Standard Functions
Zilog Developer Studio II – ZNEO™
User Manual
431
G conversion character applies to a long_double argument. If an h, l, or L appears
with any other conversion character, it is ignored.
5. A character that specifies the type of conversion to be applied.
6. A field width or precision, or both, can be indicated by an asterisk (
*) instead of a
digit string. In this case, an int argument supplies the files width or precision. The
arguments specifying field width or precision displays before the argument (if any) to
be converted. A negative field width argument is taken as a - flag followed by a posi-
tive field width. A negative precision argument is taken as if it were missing.
For more specific information about the flag characters and conversion characters for the
printf function, see the printf Flag Characters section on page 431.
Synopsis
#include <stdio.h>
int printf(const char *format, ...);
Returns
The number of characters transmitted or a negative value if an output error occurred.
Example
int i=10;
printf("This is %d",i);
The UART must be initialized using the Zilog init_uart() function. See the init_uart
command on page 182.
printf Flag Characters
– The result of the conversion is left-justified within the field.
+ The result of a signed conversion always begins with a plus or a minus sign.
Comentários a estes Manuais