Portability Function: Locates the index of the last occurrence of a substring within a string.
Module: USE DFPORT
Syntax
Results:
The result is of type INTEGER(4). The result is the starting position of the final occurence of substrg in string. Returns 0 if substring does not occur in string.
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also: INDEX
Example
USE DFPORT
character*80 mainstring
character*4 shortstr
integer(4) where
mainstring="Hello Hello Hello Hello There There There"
shortstr="Hello"
where=rindex(mainstring,shortstr)
! where is 19