User manual

WI-GTWY-9-xxx Wireless Gateway User Manual
171
A number, the precision, that specifies the maximum number of characters to be
printed from a string, or the number of digits to be printed after the decimal point for
e, E, or F conversions, or the number of significant digits for g or G conversion, or the
minimum number of digits to be printed for an integer (leading 0s will be added to
make up the necessary width)
A length modifier h, l, or L. "h" Indicates that the corresponding argument is to be
printed as a short or unsigned short; "l" or “L” indicates a long or unsigned long.
The conversion characters and their meanings are shown below. If the character after the
% is not a conversion character, the behaviour is undefined.
Char-
acter
Argument
type
Converted to
d, i byte, word decimal notation (For signed representation. Use signed argument)
o byte, word octal notation (without a leading zero).
x, X byte, word hexadecimal notation (without a leading 0x or 0X), using abcdef for 0x
or ABCDEF for 0X.
u byte, word decimal notation.
c byte, word single character, after conversion to unsigned char.
s char* characters from the string are printed until a ‘\0’ (i.e. NULL) is reached
or until the number of characters indicated by the precision have been
printed
f float decimal notation of the form [-]mmm.ddd, where the number of d’s is
specified by the precision. The default precision is 6; a precision of 0
suppresses the decimal point.
e, E float decimal notation of the form [-]m.dddddd e+-xx or [-]m.ddddddE+-xx,
where the number of d’s specified by the precision. The default
precision is 6; a precision of 0 suppresses the decimal point.
g, G %e or %E is used if the exponent is less than -4 or greater than or
equal to the precision; otherwise %f is used. Trailing zeros and trailing
decimal point are not printed.
% - print a %