EasyManua.ls Logo

Omron CX-PROGRAMMER V8.1 - Page 214

Omron CX-PROGRAMMER V8.1
231 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 DE F G H

Table of Contents

Related product manuals