Flexible NC programming
1.9 String operations
Examples
Example 1: Concatenation of strings
Program code
DEF INT IDX=2
DEF REAL VALUE=9.654
DEF STRING[20] STRG="INDEX:2"
IF STRG=="Index:"<<IDX GOTOF NO_MSG
MSG("Index:"<<IDX<<"/value:"<<VALUE)
NO_MSG:
Example 2: Explicit type conversion with <<
Program code
DEF REAL VALUE=3.5
<<VALUE
84
Comments
; The specified type REAL variable is converted into a
STRING type.
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Comments
; Display:
"Index:2/value:9.654"
Job Planning