Conversion To Lower/Upper Case Letters (Tolower, Toupper) - Siemens Sinumerik 840D sl Programming Manual

Job planning
Hide thumbs Also See for Sinumerik 840D sl:
Table of Contents

Advertisement

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
1.9.4

Conversion to lower/upper case letters (TOLOWER, TOUPPER)

Function
The "conversion to lower/upper case letters" function allows all of the letters of a string to be
converted into a standard representation.
Syntax
<STRING_ERG>=TOUPPER("<string>")
<STRING_ERG>=TOLOWER("<string>")
Significance
TOUPPER:
TOLOWER:
<string>:
<STRING_ERG>:
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Comments
; The specified type REAL variable is converted into a
STRING type.
Using the TOUPPER command, all of the letters in a character string
are converted into upper case letters.
Using the TOLOWER command, all of the letters in a character string
are converted into lower case letters.
Character string that is to be converted
Type:
STRING
Variable for the result of the conversion
Type:
STRING
Flexible NC programming
1.9 String operations
Comments
; Didplay:
"Index:2/value:9.654"
79

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents