Print/Eprint Instruction Shared Conversion Form Table - Panasonic FP7 Series Command Reference Manual

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

14.14 PRINT/EPRINT Instruction Shared Conversion Form Table

14.14 PRINT/EPRINT Instruction Shared Conversion Form Table
This table indicates the format for the "Conversion Form" that can be inserted in the "Text
Creation Form" to be specified for operand [S1] from the PRINT instruction or the EPRINT
instruction.
Setting the control string [S1]
Specifies the conversion data type, number of characters, precision, etc. using the string data of
the following formats. A variety of options (such as inserting a sign or spaces) can also be
selected depending on the type of data to be converted. For details, see below.
[S1] =
Option setting (1)
0 : Zero padding
+ : A sign is added (plus sign)
␣: A space is inserted
- : Left align (default is right align)
# : Characters are added according to the
conversion data
characters
No. of
after conversion and the precision
Specify the total number of characters (n) and the number of
characters of precision (m) with [n.m], [n], or [.m]. The number of
characters of precision (m) changes according to the type of
conversion data
Type of data
No. of characters of precision (m)
to be converted
d , Ld, i , Li, u ,Lu,
represents the number of characters
x , Lx , b, Lb
in numerical strings.
represents the number of characters
f, Lf, e, Le, E, LE
after the decimal point.
represents the number of significant
g, Lg, G, LG
figures.
Conversion form table
Data format
Conversio
n form
Data before conversion
"%d" or
16-bit data (signed integer)
"%i"
"%Ld" or
32-bit data (signed integer)
"%Li"
16-bit data (unsigned
"%u"
integer)
32-bit data (unsigned
"%Lu"
integer)
"%x"
16-bit data
"%Lx"
32-bit data
14-70
"
%
+
12.5
ASCII data after
conversion
Decimal ASCII data
Decimal ASCII data
Decimal ASCII data
Decimal ASCII data
Hexadecimal ASCII data
Hexadecimal ASCII data
d
,
"
Option setting (2)
, : A comma is added
BCD : Postfix characters are added
H : Postfix characters are added
Type of data to be converted (1)
d: Signed integer
u: Unsigned integer
x: Unsigned integer
b: BDC integer
f: Floating point real number → Floating point ASCII
e: Floating point real number → Exponential notation
g: Floating point real number → Floating point ASCII or
s: String data
Type of data to be converted (2)
L: Specify for 32-bit integer data or 64-bit real number data
Usage example
"%d" , "%5d" , "%+5d" , "%-5d" ,
"%05d" , "%10.5d" , "% d"
"%Ld" , "%5Ld" , "%+5Ld" ,
"%-5Ld" , "%05Ld" , "%10.5Ld" , "%
Ld"
"%u" , "%5u" , "%-5u" , "%05u" ,
"%10.5u"
"%Lu" , "%5Lu" , "%-5Lu" ,
"%05Lu" , "%10.5Lu"
"%x" , "%5x" , "%-5x" , "%05x" ,
"%10.5x" , "%#x" , "%X"
"%Lx" , "%5Lx" , "%-5Lx" , "%05Lx" ,
"%10.5Lx" , "%#Lx" , "%LX"
→ Decimal ASCII
→ Decimal ASCII
→ Hexadecimal ASCII
→ Hexadecimal ASCII
ASCII
exponential notation
ASCII
→ ASCII
WUME-FP7CPUPGR-12

Advertisement

Table of Contents
loading

Table of Contents