2 INTEGER FUNCTION IXSAV
(IPAR
, IVALUE
, ISET
)
3 C***BEGIN PROLOGUE IXSAV
5 C***PURPOSE Save and recall error message control parameters.
8 C***AUTHOR Hindmarsh, Alan C., (LLNL)
11 C IXSAV saves and recalls one of two error message parameters:
12 C LUNIT, the logical unit number to which messages are printed, and
13 C MESFLG, the message print flag.
14 C This is a modification of the SLATEC library routine J4SAVE.
16 C Saved local variables..
17 C LUNIT = Logical unit number for messages. The default is obtained
18 C by a call to IUMACH (may be machine-dependent).
19 C MESFLG = Print control flag..
20 C 1 means print all messages (the default).
21 C 0 means no printing.
24 C IPAR = Parameter indicator (1 for LUNIT, 2 for MESFLG).
25 C IVALUE = The value to be set for the parameter, if ISET = .TRUE.
26 C ISET = Logical flag to indicate whether to read or write.
27 C If ISET = .TRUE., the parameter will be given
28 C the value IVALUE. If ISET = .FALSE., the parameter
29 C will be unchanged, and IVALUE is a dummy argument.
32 C IXSAV = The (old) value of the parameter.
34 C***SEE ALSO XERRWD, XERRWV
35 C***ROUTINES CALLED IUMACH
36 C***REVISION HISTORY (YYMMDD)
38 C 930329 Modified prologue to SLATEC format. (FNF)
39 C 930915 Added IUMACH call to get default output unit. (ACH)
40 C 930922 Minor cosmetic changes. (FNF)
41 C 010425 Type declaration for IUMACH added. (ACH)
42 C***END PROLOGUE IXSAV
44 C Subroutines called by IXSAV.. None
45 C Function routine called by IXSAV.. IUMACH
46 C-----------------------------------------------------------------------
50 C-----------------------------------------------------------------------
51 INTEGER IUMACH
, LUNIT
, MESFLG
52 C-----------------------------------------------------------------------
53 C The following Fortran-77 declaration is to cause the values of the
54 C listed (local) variables to be saved between calls to this routine.
55 C-----------------------------------------------------------------------
57 DATA LUNIT
/-1/, MESFLG
/1/
59 C***FIRST EXECUTABLE STATEMENT IXSAV
61 IF (LUNIT
.EQ
. -1) LUNIT
= IUMACH
()
63 IF (ISET
) LUNIT
= IVALUE
68 IF (ISET
) MESFLG
= IVALUE
72 C----------------------- End of Function IXSAV -------------------------