CODESYS RIGHT

RIGHT is a string function that returns a specified number of characters from the right side of an input string. RIGHT(STR, SIZE) returns the first SIZE characters from the right in STR. Its return type is STRING(255), and it is used in structured text programs.

Source checked9/9 values · 2026-10-26

Specification

2 sources
Languagestructured text
CodeRIGHT
GroupString Functions
SyntaxRIGHT (STR, SIZE)
DialectCODESYS

Parameters

NameData typeDescription
STRSTRING(255)String to be analyzed
SIZEINTNumber of characters

Study notes

  • RIGHT (STR, SIZE) returns the first SIZE characters from the right in string STR.
  • The example RIGHT('SUSI',3) returns 'USI'.
  • The function return type is STRING(255).
↑↓ navigate↵ openesc close