| 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 NUMEQL (TORF, LENLST, LOGLST) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** NUMEQL *** (ETCLIB) Count number of occurrences of logical in list |
| 12 |
C -- Written by Amy Gilkey - revised 12/21/87 |
| 13 |
C -- |
| 14 |
C --NUMEQL returns the number of times the given logical occurs in a list |
| 15 |
C --of logicals. |
| 16 |
C -- |
| 17 |
C --Parameters: |
| 18 |
C -- TORF - IN - the logical to be counted |
| 19 |
C -- LENLST - IN - the number of logicals in the list |
| 20 |
C -- LOGLST - IN - the list of logicals to be searched |
| 21 |
|
| 22 |
LOGICAL TORF |
| 23 |
INTEGER LENLST |
| 24 |
LOGICAL LOGLST(*) |
| 25 |
|
| 26 |
NUMEQL = 0 |
| 27 |
DO 10 I = 1, LENLST |
| 28 |
IF (TORF .EQV. LOGLST(I)) NUMEQL = NUMEQL + 1 |
| 29 |
10 CONTINUE |
| 30 |
|
| 31 |
RETURN |
| 32 |
END |