MLEN

Yields the length of strings.
lrsf_ml1_cam5
Arguments
IN
IN
STRING
Any string
MLEN
NbC
DINT
Number of characters in the IN string
Example
(* FBD Program using "MLEN" Function *)
lrsf_ml2_cam5
(* ST Equivalence: *)
nbchar := MLEN (complete_string); If (nbchar < 3) Then Return; End_if; prefix := LEFT (complete_string, 3); (* this program extracts the 3 characters on the left of the string and put the result in the prefix string variable nothing is done if the string length is less than three characters *)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal