Flexible NC programming
1.10 String operations
Job planning
1-26 Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
1.10 1.10 String operations
Overview
Further string manipulations are provided in addition to the conventional operations
"Assignment" and "Comparison" described in this section:
Parameters
Type conversion to STRING:
STRING_ERG = <<any type
1)
Result type: STRING
STRING_ERG = AXSTRING (AXIS) Result type: STRING
Type conversion from STRING:
BOOL_ERG = ISNUMBER (STRING) Result type: BOOL
REAL_ERG = NUMBER (STRING) Result type: REAL
AXIS_ERG = AXNAME (STRING) Result type: AXIS
Concatenation of strings:
any type
1)
<< any Type
1)
Result type: STRING
Conversion to lower/upper case:
STRING_ERG = TOUPPER (STRING) Result type: STRING
STRING_ERG = TOLOWER (STRING) Result type: STRING
Length of the string:
INT_ERG = STRLEN (STRING) Result type: INT
Look for character/string in the
string:
INT_ERG = INDEX (STRING, CHAR) Result type: INT
INT_ERG = RINDEX (STRING, CHAR) Result type: INT
INT_ERG = MINDEX (STRING, STRING) Result type: INT
INT_ERG = MATCH (STRING, STRING) Result type: INT
Selection of a substring:
STRING_ERG = SUBSTR (STRING, INT) Result type: INT
STRING_ERG = SUBSTR (STRING, INT,
INT)
Result type: INT
Selection of a single character:
CHAR_ERG = STRINGVAR [IDX] Result type: CHAR
CHAR_ERG = STRINGARRAY [IDX_FELD,
IDX_CHAR]
Result type: CHAR
1)
"any type" stands for the variable types INT, REAL, CHAR, STRING, and BOOL.
Special meaning of the 0 char
The 0 char is interpreted internally as end-of-string. Replacing a character by the 0 character
truncates the string.