Programming commands
6.3 Functions
MIDS function: String from mid-string
Syntax:
Description:
Parameters:
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HALLO/WELT"
VAR02=LEFT(VAR01,4,4)
END_LOAD
REPLACE Function: Replacing characters
Syntax:
Description:
Parameters:
Return value:
STRCMP function: Compare strings
Syntax:
Description:
154
(string, start [, length])
MIDS
MIDS returns a string containing the specified number of characters starting at
the specified position in the string.
string
Character string or variable with the character string to be
processed
start
Start from where characters are to be read in the string
length
Number of characters that are to be read out
; Result = "LO/W"
( string, FindString, ReplaceString [, start [, count ] ] )
REPLACE
REPLACE replaces a character/string in a string with another character/string.
string
String in which FindString is to be replaced with Replace‐
String.
FindString
String to be replaced
ReplaceString
Replacement string (is used instead of the FindString)
start
Starting position for search and replace operations
count
Number of characters that are to be searched from the start‐
ing position after FindString
string = Empty string
FindString = Empty string
ReplaceString = Empty string
start > Len(String)
count = 0
(string1, string2 [, CaseInsensitive])
STRCMP
STRCMP compares a character string with another character string.
Copy of string
Copy of string
Copy of string, in which all occurrences of Find‐
String are deleted
Empty string
Copy of string
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3