Items Control
character
string
Binary data ASCII data Description
Specification
of right align
and left align
%-5d K 100 "100␣␣"
Default is right align. To set to left align,
add minus (-) before the specification of
digit number.
%-5x H 12A "12a␣␣"
%-5b H 123 "123␣␣"
%-8.3f SF 123.4567 "123.457␣"
%-010.3e SF 1234.567 "1.235e+03␣"
Specification
of sign
%+d K 100 "+100"
A plus sign (+) is not added by default.
To add a plus sign (+), add (+). Not
available when %u, %b, or %x is
specified.
%+d K -100 "-100"
%+5d K 100 "␣+100"
%+8.3f 123.4567 "+123.457"
%+10.3e 1234.567 "+1.234e+03"
Specification
of numerical
position
%␣d K 100 "␣100"
In the case of a positive number, a
space is added to align the position in
the case of a negative number. Add a
space to align the position.
%␣d K -100 "-100"
%␣8.3f SF 123.4567 "␣123.457"
%␣8.3f SF -123.4567 "-123.457"
%␣10.3e SF 1234.567 "␣1.235e+03"
%␣10.3e SF -1234.567 "-1.235e+03"
Specification
of another
output format
for numerical
data type
%#x H 12A "0x12a" "0x" is added.
Another output
type is
automatically
given by
adding "#".
%#X H 12A "0X12A" "0X" is added.
%#8.0f SF 123.4567 "␣␣␣␣123."
"." is always added.%#10.0e SF 1234.567 "␣␣␣␣1.e+03"
%#10.3E SF 1234.567 "␣␣␣␣1.E+03"
%#9.0g SF 1234 "␣␣␣1234.0" "." is always added,
and "0" after the
decimal point is not
omitted.
%#.9G SF 1234 "1234.0000"
Specification
of additional
characters
after numerical
data
%d, K 100 "100,"
The characters that follow the
characters specified for conversion (d ,
x , b , f , e , g) are added after the
numerical ASCII data.
%x, H 100 "100,"
%xH H 100 "100H"
%bBCD H 100 "100BCD"
(Note 1) "␣" in the table represents a space.
(Note 2) For exponential notation, it consists of a code (e or E), a sign, and a 2-digit number.
(Note 3) If the conversion results in having fewer enabled digits than before conversion, the result is rounded
off.
14.9 BTOA (Conversion: BIN → ASCII)
14-34 WUME-FP7CPUPGR-12