MODULE SRCH
CONTAINS
INTEGER*4 FUNCTION VSRCH(STR, LST, L)
   IMPLICIT NONE
   CHARACTER(*), INTENT(IN):: STR
   CHARACTER(*), DIMENSION(:),INTENT(IN) :: LST
   INTEGER :: I, L
   VSRCH = -1
   DO I=1,L
       IF (LST(I) == STR) THEN
            VSRCH = I
            EXIT
       END IF
   END DO
END FUNCTION VSRCH
END MODULE

PROGRAM TEST

USE SRCH

IMPLICIT NONE

TYPE :: TableA
  CHARACTER(5) :: A
  CHARACTER(8) :: B
  INTEGER*4 D
  REAL*4 C
END TYPE

TYPE(TableA), DIMENSION(10) :: list

INTEGER*4 IDX

list%A = 'AA'
list(5)%A = 'A'
IDX = VSRCH("A", list%A, 10)
PRINT *, "Found ", IDX

END