GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
xsetua.f
Go to the documentation of this file.
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