RIGHT
From the right ends of strings, yields the number of characters defined.

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. |
RIGHT | Q | MESSAGE | Right part of the string (length = NbC) empty string if NbC <= 0 complete string if NbC >= string length |
Example
(* FBD Program using "LEFT" and "RIGHT" Functions *)

(* ST Equivalence: *)
complete_string := INSERT (RIGHT ('12345678', 4), LEFT ('12345678', 4),5); (* complete_string is '56781234' the value issued from RIGHT call is '5678' the value issued from LEFT call is '1234' *)
Provide Feedback