
IT Functionality 9-14
© 2005 HMS Industrial Networks.
AB7607 User manual
The conversion characters and their meaning are shown below. If the character
after the “%” is not conversion character, the behavior is undefined.
Charac-
ter
Argument
Type
Converted To
d, i
Byte,Short
Signed Decimal Notation
o
Byte,Short
Unsigned Octal Notation (without a leading
zero)
x,X
Byte,Short
Unsigned hexadecimal notation (without a lead-
ing 0x or 0X)
u
Byte,Short
Unsigned decimal notation
c
Byte,Short
Single character, after conversion to unsigned
char
s
char *
Characters from the string are printed until a “\0”
is reached or until the number of characters indi-
cated by the precision have been printed
f
Long
Decimal notation of the form [-] m. -xx
or [-]m.-xx 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
Long
Decimal notation of the form [-] m. -xx
or [-]m.-xx where the number of d’s is
specified by the precision. The default precision
is 6; a precision of 0 suppresses the decimal
point.
g,G
Long
“%e” or “%E” is used if the exponent is less than
-4 or greater than or equal to the precision; other-
wise “%f” is used. Trailing zeroes and trailing
decimal point are not printed.
%
Print a “%”
Table 9-2 printf Conversion Characters