Standard Functions
Text String Functions
LEN: Detect String Length
• Function
Finds the length of a specified text string.
• Application
Return_value := LEN(string);
• Arguments and Return Values
Variable name
String
Return_value
• Example
Variables
STRING Message
INT Result
LEFT: Extract Characters from Left
• Function
Extracts the specified number of characters from the left of the specified text string.
• Application
Return_value := LEFT(Source_string, Number_of_characters);
• Arguments and Return Values
Variable name
Source_string
Number_of_characters
Return_value
• Example
Variables
Message
STRING Message
STRING Result
RIGHT: Extract Characters from Right
• Function
Extracts the specified number of characters from the right of the specified text string.
• Application
Return_value := RIGHT(Source_string, Number_of_characters);
Appendix C
Function Descriptions
Data type
STRING
INT
A
B
C
D
Message
Result:=LEN(Message);
→ "8" is stored in Result variable.
Data type
STRING
INT, UINT
STRING
A
B
C
D
Result:=LEFT(Message,3);
→ "ABC" is stored in the Result variable.
Description
Specifies the text string for
which to find the length.
Returns the size of the speci-
fied text string.
E
F
G
H
Description
Specifies the text string from which to
extract characters.
Specifies the number of characters to
extract.
Returns the extracted characters.
E
F
G
H
187
Need help?
Do you have a question about the CX-PROGRAMMER V8.1 and is the answer not in the manual?
Questions and answers