Search For Character/String In The String (Index, Rindex, Mindex, Match) - Siemens SINUMERIK 840D sl Programming Manual

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

Advertisement

1.9.6

Search for character/string in the string (INDEX, RINDEX, MINDEX, MATCH)

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.
Syntax
INT_ERG=INDEX(STRING,CHAR) ; Result type: INT
INT_ERG=RINDEX(STRING,CHAR) ; Result type: INT
INT_ERG=MINDEX(STRING,STRING) ; Result type: INT
INT_ERG=MATCH(STRING,STRING) ; Result type: INT
Semantics
Search functions: It supplies the position in the string (fist parameter) where the search has
been successful. If the character/string cannot be found, then the value -1 is returned. The
first character has position 0.
Significance
INDEX:
RINDEX:
MINDEX:
MATCH:
This allows strings to be broken up according to certain criteria, for example, at positions
with blanks or path separators ("/").
Job Planning
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Searches for the character specified as second parameter (from the
beginning) in the first parameter.
Searches for the character specified as second parameter (from the end) in
the first parameter.
Corresponds to the INDEX function, except for the case that a list of
characters is transferred (as string) in which the index of the first found
character is returned.
Searches for a string in a string.
Flexible NC programming
1.9 String operations
87

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents