INTEGER FUNCTION FindNumberinList(WhichNumber,ListofItems,NumItems)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN September 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function looks up a number(integer) in a similar list of
! items and returns the index of the item in the list, if
! found.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: WhichNumber
INTEGER, 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
FindNumberinList=0
DO Count=1,NumItems
IF (WhichNumber == ListofItems(Count)) THEN
FindNumberinList=Count
EXIT
ENDIF
END DO
RETURN
END FUNCTION FindNumberinList