1.9
String operations
Sting operations
In addition to the classic operations "assign" and "comparison" the following string operations
are possible:
•
Type conversion to STRING (AXSTRING) [Page 76]
•
Type conversion from STRING (NUMBER, ISNUMBER, AXNAME) [Page 77]
•
Concatenation of strings (<<) [Page 78]
•
Conversion to lower/upper case letters (TOLOWER, TOUPPER) [Page 79]
•
Determine length of string (STRLEN) [Page 80]
•
Search for character/string in the string (INDEX, RINDEX, MINDEX, MATCH) [Page 81]
•
Selection of a substring (SUBSTR) [Page 82]
•
Selection of a single character (STRINGVAR, STRINGFELD) [Page 83]
•
Formatting a string (SPRINT) [Page 84]
Special significance of the 0 character
Internally, the 0 character is interpreted as the end identifier of a string. If a character is
replaced with the 0 character, the string is truncated.
Example:
Program code
DEF STRING[20] STRG="axis . stationary"
STRG[6]="X"
MSG(STRG)
STRG[6]=0
MSG(STRG)
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Flexible NC programming
1.9 String operations
Comment
; Supplies the message "axis X
stationary".
; Supplies the message "axis".
75