Datasheet
569
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Description
Each field in the format specification can be a single character or a number
which specifies a particular format option. The
conversion_type field is where
a single character specifies that the argument is interpreted as a character,
string, number, or pointer, as shown in the following table:
The
flags field is where a single character is used to justify the output and to
print +/- signs and blanks, decimal points, and octal and hexadecimal prefixes,
as shown in the following table.
conversion_type
Argument Type Output Format
d int
Signed decimal number
u unsigned int
Unsigned decimal number
o unsigned int
Unsigned octal number
x unsigned int
Unsigned hexadecimal number
using 0123456789abcdef
X unsigned int
Unsigned hexadecimal number
using 0123456789ABCEDF
f double
Floating-point number using the for-
mat [-]dddd.dddd
e double
Floating-point number using the for-
mat [-]d.dddde[-]dd
E double
Floating-point number using the for-
mat [-]d.ddddE[-]dd
g double
Floating-point number using either e or
f format, whichever is more compact
for the specified value and precision
c int
int is converted to unsigned char,
and the resulting character is written
s char *
String with a terminating null character
p void *
Pointer value, the X format is used
% <none>
A % is written. No argument is con-
verted. The complete conversion
specification shall be %%.