MIDS function: String from mid-string
Syntax: MIDS
(string, start [, length])
Description: MIDS returns a string containing the specified number of characters starting at
the specified position in the string.
Parameters: 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
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HALLO/WELT"
VAR02=LEFT(VAR01,4,4) ; Result = "LO/W"
END_LOAD
REPLACE Function: Replacing characters
Syntax: REPLACE
( string, FindString, ReplaceString [, start [, count ] ] )
Description: REPLACE replaces a character/string in a string with another character/string.
Parameters: 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
Return value:
string = Empty string Copy of string
FindString = Empty string Copy of string
ReplaceString = Empty string Copy of string, in which all occurrences of Find‐
String are deleted
start > Len(String) Empty string
count = 0 Copy of string
STRCMP function: Compare strings
Syntax: STRCMP
(string1, string2 [, CaseInsensitive])
Description: STRCMP compares a character string with another character string.
Programming commands
6.3 Functions
SINUMERIK Integrate Run MyScreens
154 Programming Manual, 10/2015, 6FC5397-3DP40-5BA3