Debian Codegraph @

packages/seacas/applications/blot/prtdev.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 PRTDEV (STRING, DEVNAM, INCDEV)
9 C=======================================================================
10
11 C --*** PRTDEV *** (BLOT) Internal to SHODEV
12 C -- Written by Amy Gilkey - revised 06/01/87
13 C --
14 C --PRTDEV prints a device-dependent parameter string, including the
15 C --device name if there is more than one device.
16 C --
17 C --Parameters:
18 C -- STRING - IN - the parameter string with '$' where ' on DEV' belongs
19 C -- DEVNAM - IN - the device name
20 C -- INCDEV - IN - true iff device name is to be included
21
22 C --Routines Called:
23 C -- LENSTR - (STRLIB) Find string length
24
25 CHARACTER*(*) STRING
26 CHARACTER*(*) DEVNAM
27 LOGICAL INCDEV
28
29 LOGICAL DEVOK
30
31 L = LENSTR (STRING)
32 I = INDEX (STRING, '$')
33 IF (I .EQ. 0) I = L+1
34
35 DEVOK = (DEVNAM .NE. '$$$')
36
37 IF (I .GE. L) THEN
38 IF (.NOT. (INCDEV .AND. DEVOK)) THEN
39 WRITE (*, 10000) STRING(1:I-1)
40 ELSE
41 WRITE (*, 10000) STRING(1:I-1), ' on ', DEVNAM
42 END IF
43 ELSE
44 IF (.NOT. (INCDEV .AND. DEVOK)) THEN
45 WRITE (*, 10000) STRING(1:I-1), STRING(I+1:L)
46 ELSE
47 WRITE (*, 10000) STRING(1:I-1), ' on ', DEVNAM,
48 & STRING(I+1:L)
49 END IF
50 END IF
51
52 RETURN
53 10000 FORMAT (1X, 6A)
54 END