Debian Codegraph @

packages/seacas/applications/grepos/gp_ordstr.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 SUBROUTINE ORDSTR (NORD, IXORD, LOLD, NAME, ISCR)
9 C=======================================================================
10 C --*** ORDSTR *** (GJOIN) Order a list of strings according to indices
11 C -- Written by Greg Sjaardema - revised 07/11/90
12 C -- Modified from ORDIX Written by Amy Gilkey
13 C --
14 C --ORDSTR orders a list of strings according to a list of indices.
15 C --
16 C --Parameters:
17 C -- NORD - IN - the number of indices
18 C -- IXORD - IN - the indices of the ordered items
19 C -- LOLD - IN - the length of NAME
20 C -- NAME - IN - the unordered string list
21 C -- ISCR - SCRATCH - size = LOLD
22 C -- INEW - OUT - the ordered string list
23
24 INTEGER IXORD(*)
25 CHARACTER*(*) NAME(*)
26 CHARACTER*(*) ISCR(*)
27
28 DO 100 I = 1, LOLD
29 ISCR(I) = NAME(I)
30 100 CONTINUE
31 DO 110 I = 1, NORD
32 NAME(I) = ISCR(IXORD(I))
33 110 CONTINUE
34
35 RETURN
36 END