Look For Character/String In The String - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

1.10.6

Look for character/string in the string

Function
This functionality searches for single characters or a string within a string. The function
results specify where the character/string is positioned in the string that has been searched.
Programming
Syntax
INT_ERG = INDEX
INT_ERG = RINDEX
INT_ERG = MINDEX
INT_ERG = MATCH
Semantics
Search functions: They return the position in the string (first parameter) where the search
has been successful. If the character/string cannot be found, the value "–1" is returned. In
this case, the first character is in position 0.
Parameters
INDEX
RINDEX
MINDEX
MATCH
This can be used to break up a string by certain criteria, for example, at blanks or path
separators ("/").
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
(STRING,CHAR)
(STRING,CHAR)
(STRING,STRING)
(STRING,STRING)
searches for the character specified as
the second parameter in the string
specified as the second parameter (from
the beginning).
searches for the character specified as
the second parameter in the string
specified as the second parameter (from
the end).
same as the INDEX function except that a
list of characters is specified (as a
string) and the index of the first
character found is returned.
searches for a string in a string.
Flexible NC programming
1.10 String operations
Result type: INT
Result type: INT
Result type: INT
Result type: INT
1-31

Advertisement

Table of Contents
loading

Table of Contents