5-164
5.7 Standard Character String Functions
5.7.3 String insertion
INSERT(_E)
(Example) Value input to is 4
(2) The values to be input to and are string type data within the range from 0 to 255
bytes.
(3) The value to be input to is word (signed) type data within the range from 1 to 255.
(The input value must not exceed the number of characters of character string input to .)
Operation result
(1) Function without EN/ENO
An operation is executed and the operation value is output from .
(2) Function with EN/ENO
The following table shows the executing conditions and operation results.
*1 When FALSE is output from ENO, the data output from is undefined.
In this case, create a program so that the data output from is not used.
EN ENO
TRUE (Operation execution) TRUE Operation output value
FALSE (Operation stop)
FALSE
*1
Undefined value
n
Input value to IN2
Input value to IN1
Output value
Start position to
be inserted :
4th character
2nd word
3rd word
4th word
5th word
6th word
1st word
32H(2) 31H(1)
34
H(4) 33H(3)
36
H(6)
00
H
35H(5)
'123456'
2nd word
3rd word
4th word
1st word
High-order byte Low-order byte
42H(B) 41H(A)
44
H(D) 43H(C)
00
H 45H(E)
'ABCDE'
2nd word
3rd word
1st word
High-order byte Low-order byte
42H(B) 41H(A)
31
H(1) 43H(C)
33
H(3) 32H(2)
35
H(5) 34H(4)
36
H(6)44H(D)
00
H 45H(E)
'ABC123456DE'
High-order byte Low-order byte
n
s1
s2
n
s1
d
d
d
d