![background image](http://html1.mh-extra.com/html/omron/sysmac-cx-programmer-9/sysmac-cx-programmer-9_operation-manual_744241215.webp)
189
Function Descriptions
Appendix C
• Example
INSERT: Insert Characters
• Function
Inserts the specified characters into a text string.
• Application
Return_value
:= INSERT
(Source_string, Insert_string, Position)
;
• Arguments and Return Values
• Example
DELETE: Delete Characters
• Function
Deletes the specified number of characters starting from the specified position of the specified text
string.
• Application
Return_value
:= DEL
(Source_string, Number_of_characters, Position)
;
• Arguments and Return Values
Variable name
Data type
Description
Source_string
STRING
Specifies the text string into which to insert char-
acters.
Insert_string
STRING
Specifies the text string to be inserted.
Position
INT, UINT
Specifies the position at which to insert charac-
ters. The first character is position “1” (e.g., posi-
tion 1 is “A” in message 1 in the following
illustration).
Return_value
STRING
Returns the text string with the characters
inserted.
Variable name
Data type
Description
Source_string
STRING
Specifies the text string from which to delete
characters.
Number_of_characters
INT, UINT
Specifies the number of characters to delete.
Position
INT, UINT
Specifies the position from which to delete
characters. The first character is position “1”
(e.g., position 1 is “A” in message 1 in the fol-
lowing illustration).
Return_value
STRING
Returns the text string with the specified
number of characters deleted.
Message 1
Variables
STRING Message1
STRING Message2
STRING Message3
STRING Result
Result:=CONCAT(Message1,Message2,Message3);
→
"ABCDEFGH" is stored in the
Result
variable.
A
B
C
D
E
F G H
A
B
C
D E F G H
Message 2
Message 3
Result
Message 1
Variables
STRING Message1
STRING Message2
STRING Result
Result := INSERT(Message1, Message2, 2);
→
"ABEFGHC" is stored in the
Result
variable.
Message 2
Result
A
B
C
D
E
F G H
A
B
C D
E
F G H
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......