MID¶
Provided by Standard Library.
Function of type STRING, returns a partial string from within a string.
Inputs:
STR : STRING; string to be analyzed
LEN : INT; length of the partial string (number of characters), value must be greater or equal “0”.
POS : INT; start position for the partial string, number of characters counted from the left of STR, starting with “1”
Return value: STRING, partial string
MID (STR, LEN, POS) means: Retrieve LEN characters from the STR string beginning with the character at position POS.
Example in IL: ( Result is ‘US’ )\ \ \ \
Example in FBD:\ \ \ \
Example in ST:\ \ \ \
VarSTRING1 := MID ('SUSI',2,2);