XL Fortran for AIX 8.1

Language Reference


INDEX(STRING, SUBSTRING, BACK)

Returns the starting position of a substring within a string.

STRING
must be of type character.

SUBSTRING
must be of type character with the same kind type parameter as STRING.

BACK (optional)
must be of type logical.

Class

Elemental function

Result Type and Attributes

Default integer.

Result Value

Examples

INDEX ('FORTRAN', 'R') has the value 3.

INDEX ('FORTRAN', 'R', BACK = .TRUE.) has the value 5.


Specific Name Argument Type Result Type Pass As Arg?
INDEX default character default integer yes (1)

Notes:

  1. When this specific name is passed as an argument, the procedure can only be referenced without the BACK optional argument.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]