Skip to main content

7.9.6 INSERT

Function

INSERT is called the string insertion function. It inserts the string IN2 into the string IN1, starting from the P position, and OUT outputs the content of the inserted string

LD graphics:

Alt text

Parameter description

Interface variableDeclarationData typeDescription
IN1InputSTRINGString
IN2InputSTRINGString
PInputINTPosition to start inserting
Function nameReturn valueSTRINGString

Corresponding syntax

  • IN1: Enter the first string
  • IN2: Enter the second string
  • OUT: Output the inserted string
  • P: The position where to start inserting the string

Example

  • LD sample animation is as follows:

alt text

  • ST example is shown in the following code:
OUT:=INSERT(IN1:=IN1,IN2:=IN2,P:=8);