Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | String | |||
character(len=*), | intent(in), | DIMENSION(:) | :: | ListofItems | ||
integer, | intent(in) | :: | NumItems |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
INTEGER FUNCTION FindItem(String,ListofItems,NumItems)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN April 1999
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function looks up a string in a similar list of
! items and returns the index of the item in the list, if
! found. This routine is case insensitive -- it uses the
! SameString function to assure that both strings are in
! all upper case.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: String
CHARACTER(len=*), INTENT(IN), DIMENSION(:) :: ListofItems
INTEGER, INTENT(IN) :: NumItems
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER Count
CHARACTER(len=MaxInputLineLength) StringUC
CHARACTER(len=MaxInputLineLength) ListUC
FindItem=0
FindItem=FindItemInList(String,ListofItems,NumItems)
IF (FindItem /= 0) RETURN
!
StringUC=MakeUPPERCase(String)
DO Count=1,NumItems
ListUC=MakeUPPERCase(ListofItems(Count))
IF (StringUC == ListUC) THEN
FindItem=Count
EXIT
ENDIF
END DO
RETURN
END FUNCTION FindItem