LEFT

Extracts the left part of a message string. The number of characters to be extracted is given.
lrsf_le1.gif
Arguments
IN
IN
MESSAGE
Any non-empty string
NbC
NbC
DINT
Number of characters to be extracted. This number cannot be greater than the length of the IN string.
LEFT
Q
MESSAGE
Left part of the IN string (its length = NbC)
empty string if NbC <= 0
complete IN string if NbC >= IN string length
Example
(* FBD Program using "LEFT" and "RIGHT" Functions *)
lrsf_le_ri.gif
(* ST Equivalence: *)
complete_string := RIGHT ('12345678', 4) + LEFT ('12345678', 4); (* complete_string is '56781234' the value issued from RIGHT call is '5678' the value issued from LEFT call is '1234' *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal