■
Setting conversion data for the control string [S1]
Control
character
string
Data format
Available
operation
units
Usage example
BIN data before
conversion
ASCII data after
conversion
"%d" or
"%i"
16-bit data (signed integer) Decimal ASCII data SS "%d" , "%5d" , "%
+5d" , "%-5d" , %05d" ,
%10.5d" , "%d," , "% d"
32-bit data (signed integer) Decimal ASCII data SL
"%u"
16-bit data (unsigned
integer)
Decimal ASCII data US
"%u" , "%5u" , "%
+5u" , "%-5u","%05u" ,
%10.5u" , "%u,"
32-bit data (unsigned
integer)
Decimal ASCII data UL
"%x"
16-bit data
Hexadecimal ASCII data
(Forward/reverse direction)
US
"%x" , "%5x" , "%-5x" ,
"%05x", "%10.5x" ,
"%x," , "%#x" , "%X"
32-bit data
Hexadecimal ASCII data
(Forward/reverse direction)
UL
"%b"
16-bit BCD data
Decimal ASCII data
(Forward/reverse direction)
US
"%b" , "%5b" , "%-5b" ,
"%05b", "%10.5b" ,
"%b,"
32-bit BCD data
Decimal ASCII data
(Forward/reverse direction)
UL
"%f"
32-bit single-precision real
number data
Floating point number ASCII
data
SF
"%f" , "%5.2f" , "%
+5.2f"
"%-5.2f" , "%05.2f" ,
"%f,"
"%#f" , "% f"
64-bit double-precision real
number data
Floating point number ASCII
data
DF
"%e"
32-bit single-precision real
number data
Exponential notation ASCII
data
SF
"%e" , "% 5.2e" , "%
+5.2e" , "%-5.2e" ,
"%05.2e" ,"%# 5.2e" ,
"% e" , "%E"
64-bit double-precision real
number data
Convert to exponential
notation ASCII data
DF
"%g"
32-bit single-precision real
number data
Exponential notation ASCII
data or floating-point ASCII
data
(whichever is shorter in the
relevant notation)
SF
"%g" , "%5.2g" , "%
+5.2g", "%-5.2g" ,
"%05.2g" , "%g,",
"%#5.2g" , "%G"
64-bit double-precision real
number data
Exponential notation ASCII
data or floating-point ASCII
data
(whichever is shorter in the
relevant notation)
DF
(Note 1) The number of converted digits for a control string is up to 16.
■
Application example of control string [S1]
The following is a conversion example according to the operation unit and conversion direction.
Oper
ation
unit
Conv
ersio
n
direct
ion
Control
character
string
Binary data ASCII data Description
US
Rever
se
%+12.5u K 1234 "␣␣␣␣␣␣␣01234"
When %u is specified, the result is
not signed.
14.9 BTOA (Conversion: BIN → ASCII)
14-32 WUME-FP7CPUPGR-12