Debian Codegraph @

packages/seacas/libraries/suplib/ffmatc.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 LOGICAL FUNCTION FFMATC (IFLD, INTYP, CFIELD, MATCH, NLET)
9 C=======================================================================
10
11 C --*** FFMATC *** (FFLIB) Parse free-field character string if match
12 C -- Written by Amy Gilkey - revised 07/01/87
13 C --
14 C --FFMATC parses a character field and returns true (and increments
15 C --IFLD) iff it is equal to the match string. Only NLET letters must
16 C --be in the input field to match, but if more letters are given, they
17 C --must match the match string exactly.
18 C --
19 C --Parameters:
20 C -- IFLD - IN/OUT - the index of the current field number, incremented
21 C -- only if field matches
22 C -- INTYP - IN - the input type from the free-field reader
23 C -- CFIELD - IN - the character fields
24 C -- MATCH - IN - the match string
25 C -- NLET - IN - number of letters that must match
26
27 C --Routines Called:
28 C -- MATSTR - (STRLIB) Check if string matches
29
30 INTEGER IFLD
31 INTEGER INTYP(*)
32 CHARACTER*(*) CFIELD(*)
33 CHARACTER*(*) MATCH
34 INTEGER NLET
35
36 LOGICAL MATSTR
37
38 IF (INTYP(IFLD) .GE. 0) THEN
39 FFMATC = MATSTR (CFIELD(IFLD), MATCH, NLET)
40 IF (FFMATC) IFLD = IFLD + 1
41 ELSE
42 FFMATC = .FALSE.
43 END IF
44
45 RETURN
46 END