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