Debian Codegraph @

packages/seacas/libraries/suplib/wheneq.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 subroutine wheneq(n,array,inc,target,index,nval)
8 C see WHENEQ (3SCI) Math and Scientific Library, Cray Research, Inc
9 DIMENSION ARRAY(*), INDEX(*)
10 INA = 1
11 NVAL = 0
12 IF(INC .LT. 0) INA = (-INC) * (N-1) + 1
13 DO 100 I=1,N
14 IF( ARRAY(INA) .EQ. TARGET)THEN
15 NVAL = NVAL + 1
16 INDEX(NVAL) = I
17 ENDIF
18 INA = INA + INC
19 100 CONTINUE
20 RETURN
21 END