| 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 |
C======================================================================= |
| 7 |
SUBROUTINE CHKRNG (IARRAY, NITEMS, MAXVAL, NZERO, NERR) |
| 8 |
C======================================================================= |
| 9 |
|
| 10 |
C --*** CHKRNG *** (EXPLORE) Check count of items |
| 11 |
C -- |
| 12 |
C --CHKRNG checks that each item in an array of items is within the |
| 13 |
C --specified range. |
| 14 |
C -- |
| 15 |
C --Parameters: |
| 16 |
C -- IARRAY - IN - the array |
| 17 |
C -- NITEMS - IN - the number of items in IARRAY |
| 18 |
C -- MAXVAL - IN - the maximum range value, minimum = 1 |
| 19 |
C -- NZERO - OUT - the number of 'zero' out-of-range values |
| 20 |
C -- NERR - OUT - the number of out-of-range values |
| 21 |
|
| 22 |
INTEGER IARRAY(*) |
| 23 |
|
| 24 |
NERR = 0 |
| 25 |
NZERO = 0 |
| 26 |
DO 100 I = 1, NITEMS |
| 27 |
N = IARRAY(I) |
| 28 |
IF (N .LT. 1) NZERO = NZERO + 1 |
| 29 |
IF (N .GT. MAXVAL) NERR = NERR + 1 |
| 30 |
100 CONTINUE |
| 31 |
|
| 32 |
RETURN |
| 33 |
END |