Debian Codegraph @

packages/seacas/libraries/suplib/locstr.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 INTEGER FUNCTION LOCSTR (STR, LENLST, STRLST)
9 C=======================================================================
10
11 C --*** LOCSTR *** (STRLIB) Find string in list
12 C -- Written by Amy Gilkey - revised 03/21/88
13 C --
14 C --LOCSTR returns the index of the given string in a list of strings.
15 C --If the string is not in the list, returns 0.
16 C --
17 C --Parameters:
18 C -- STR - IN - the string to be searched for
19 C -- LENLST - IN - the number of strings in the list
20 C -- STRLST - IN - the list of strings to be searched
21
22 CHARACTER*(*) STR
23 INTEGER LENLST
24 CHARACTER*(*) STRLST(*)
25
26 DO 10 LOCSTR = 1, LENLST
27 IF (STR .EQ. STRLST(LOCSTR)) GOTO 20
28 10 CONTINUE
29 LOCSTR = 0
30
31 20 CONTINUE
32 RETURN
33 END