FUNCTION DELETE : STRING(255)
Löscht eine Anzahl von Zeichen aus einem String.
DELETE (STR, LEN, POS) means: Delete LEN characters from STR, beginning with the character in the POS position.
POS = 0 or POS = 1, are both addressing the first character.
The current implementation is unfortunately not correct for the case Pos=0. The implementation cannot be changed for compatibility reasons.
If Pos=0 is used, the parameter LEN is internally reduced by one!
It is generally recommended to use values in the range specified by IEC 61131-3. The smallest value for Pos is specified there as 1.
(* Example declaration *)
VarSTRING1 : STRING ;
(* Example in ST , result is 'SUSI' *)
VarSTRING1 := DELETE ('SUXYSI',2,3);
Ein-/Ausgänge: |
|