3274
|
1 *DECK XSETUA |
|
2 SUBROUTINE XSETUA (IUNITA, N) |
|
3 C***BEGIN PROLOGUE XSETUA |
|
4 C***PURPOSE Set logical unit numbers (up to 5) to which error |
|
5 C messages are to be sent. |
|
6 C***LIBRARY SLATEC (XERROR) |
|
7 C***CATEGORY R3B |
|
8 C***TYPE ALL (XSETUA-A) |
|
9 C***KEYWORDS ERROR, XERROR |
|
10 C***AUTHOR Jones, R. E., (SNLA) |
|
11 C***DESCRIPTION |
|
12 C |
|
13 C Abstract |
|
14 C XSETUA may be called to declare a list of up to five |
|
15 C logical units, each of which is to receive a copy of |
|
16 C each error message processed by this package. |
|
17 C The purpose of XSETUA is to allow simultaneous printing |
|
18 C of each error message on, say, a main output file, |
|
19 C an interactive terminal, and other files such as graphics |
|
20 C communication files. |
|
21 C |
|
22 C Description of Parameters |
|
23 C --Input-- |
|
24 C IUNIT - an array of up to five unit numbers. |
|
25 C Normally these numbers should all be different |
|
26 C (but duplicates are not prohibited.) |
|
27 C N - the number of unit numbers provided in IUNIT |
|
28 C must have 1 .LE. N .LE. 5. |
|
29 C |
|
30 C***REFERENCES R. E. Jones and D. K. Kahaner, XERROR, the SLATEC |
|
31 C Error-handling Package, SAND82-0800, Sandia |
|
32 C Laboratories, 1982. |
|
33 C***ROUTINES CALLED J4SAVE, XERMSG |
|
34 C***REVISION HISTORY (YYMMDD) |
|
35 C 790801 DATE WRITTEN |
|
36 C 861211 REVISION DATE from Version 3.2 |
|
37 C 891214 Prologue converted to Version 4.0 format. (BAB) |
|
38 C 900510 Change call to XERRWV to XERMSG. (RWC) |
|
39 C 920501 Reformatted the REFERENCES section. (WRB) |
|
40 C***END PROLOGUE XSETUA |
|
41 DIMENSION IUNITA(5) |
|
42 CHARACTER *8 XERN1 |
|
43 C***FIRST EXECUTABLE STATEMENT XSETUA |
|
44 C |
|
45 IF (N.LT.1 .OR. N.GT.5) THEN |
|
46 WRITE (XERN1, '(I8)') N |
|
47 CALL XERMSG ('SLATEC', 'XSETUA', |
|
48 * 'INVALID NUMBER OF UNITS, N = ' // XERN1, 1, 2) |
|
49 RETURN |
|
50 ENDIF |
|
51 C |
|
52 DO 10 I=1,N |
|
53 INDEX = I+4 |
|
54 IF (I.EQ.1) INDEX = 3 |
|
55 JUNK = J4SAVE(INDEX,IUNITA(I),.TRUE.) |
|
56 10 CONTINUE |
|
57 JUNK = J4SAVE(5,N,.TRUE.) |
|
58 RETURN |
|
59 END |