485
RIGHT, RIGHTP, LEFT, LEFTP
1
2
3
4
4
6
7
8
7.11
Char
acter
string processing inst
ructions
7.11.1
5
RIGHT, R
IGH
TP, LEFT
, LEFT
P
: Character string or head number of the devices where the character string is stored (character string)
: Head number of the devices where the character string consisting of n characters starting from the right or left of
will be stored (character string)
n
: Number of characters to be extracted (BIN 16 bits)
F
unct
i
on
RIGHT
(1) Stores n number of characters from the right side of the character string (the end of the character string) being stored in
devices starting from that whose number is designated by , in devices starting from that whose number is designated
by .
When n 5
(2) The NULL code (00
H
) indicating the end of the character string is automatically appended at the end of the character
string. Refer to Page 90, Section 3.2.5 for the format of the character string data.
(3) If the number of characters designated by n is "0", the NULL code (00
H
) will be stored at .
7.11.15 RIGHT, RIGHTP
Extracting character string data from the right
LEFT, LEFTP
Extracting character string data from the left
7.11.15
RIGHT, RIGHTP, LEFT, LEFTP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
Other
Bit
Word
Bit
Word
K, H
$
––
––
––
––
––
––
––
––
––
n
––
––
Process
High
performance
Redundant Universal
LCPU
Bas
i
c
Command
P
n
n
S
D
Command
RIGHTP, LEFTP
RIGHT, LEFT
i
nd
i
cates
an
i
nstruct
i
on
symbo
l
of
R
I
G
HT/LEFT.
S
D
S
D
S
S
D
S
D
+1
ASCII code for the 1st character
ASCII code for the 2nd character
ASCII code for the 3rd character
ASCII code for the 4th character
ASCII code for the (last - n + 1)th character
ASCII code for the (last - n + 2)th character
ASCII code for the (last - n + 3)th character
ASCII code for the (last - n + 4)th character
ASCII code for the (last - 2)th character
ASCII code for the (last - 1)th character
ASCII code for the last character
00
H
+1
ASCII code for the (last - n + 1)th character
ASCII code for the (last - n + 2)th character
ASCII code for the (last - n + 3)th character
ASCII code for the (last - n + 4)th character
ASCII code for the (last - 2)th character
ASCII code for the (last - 1)th character
ASCII code for the last character
00
H
b15
b8b7
b0
S
S
b15
b8b7
b0
D
D
+
1
4
1
H
(A)
4
2
H
(B)
4
3
H
(C)
44
H
(D)
+
1
31
H
(1)
32
H
(2)
33
H
(3)
3
4
H
(
4
)
4
5
H
(
E
)
4
6
H
(
F
)
31
H
(1)
32
H
(2)
33
H
(3)
3
4
H
(
4
)
35
H
(5)
00
H
+
2
+
3
+4
+
5
+
2
35
H
(5)
00
H
ASC
II
code
for
the
5th
character
"
ABCD
EF
123
4
5
"
"
123
4
5
"
b15
b8b7
b0
S
S
S
S
S
S
D
D
D
b15
b8b7
b0
D