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.
INTEGER FUNCTION FindIteminList(String,ListofItems,NumItems)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN September 1997
! 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 not case insensitive and doesn't need
! for most inputs -- they are automatically turned to UPPERCASE.
! If you need case insensitivity use FindItem.
! 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
FindIteminList=0
DO Count=1,NumItems
IF (String == ListofItems(Count)) THEN
FindIteminList=Count
EXIT
ENDIF
END DO
RETURN
END FUNCTION FindIteminList