Flexible NC programming
1.9 String operations
Job planning
80 Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
1.9.5 Determine length of string (STRLEN)
Function
The STRLEN command can be used to determine the length of a character string.
Syntax
<INT_ERG>=STRLEN("<STRING>")
Significance
STRLEN: The STRLEN command determines the length of the specified character
string.
The number of characters that are not the 0 character, counting from the
beginning of the string is returned.
Character string whose length is to be determined
<string>:
Type: STRING
Variable for the result of the determination
<INT_ERG>:
Type: INT
Example
In conjunction with the single character access, this function allows the end of a character
string to be determined:
Program code
IF (STRLEN(BAUSTEIN_NAME)>10) GOTOF ERROR