Skip to main content

7.9.3 MID

Function

MID is called the interception function within the string, that is, P is the character from which interception begins, and a total of L characters are intercepted. OUT outputs the content of the intercepted string

LD graphics

Alt text

Parameter description

Interface variableDeclarationData typeDescription
INInputSTRINGString
LInputINTNumber of intercepted characters
PInputINTStart interception position
Function nameReturn valueSTRINGString

Corresponding syntax

  • IN: Input string
  • P: From which character to start intercepting
  • L: How many characters are intercepted in total

Example

  • LD sample animation is as follows:

alt text

  • ST example is shown in the following code:
OUT:=MID(IN:=IN1,L:=4,P:=3);