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
Parameter description
| Interface variable | Declaration | Data type | Description |
|---|---|---|---|
| IN | Input | STRING | String |
| L | Input | INT | Number of intercepted characters |
| P | Input | INT | Start interception position |
| Function name | Return value | STRING | String |
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:

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