Forgot to load lapack in a few examples
[maxima.git] / share / odepack / fortran / ixsav.f
blob1cd2bf364bd6d047641bd646aaf07a9b00b35935
1 *DECK IXSAV
2 INTEGER FUNCTION IXSAV (IPAR, IVALUE, ISET)
3 C***BEGIN PROLOGUE IXSAV
4 C***SUBSIDIARY
5 C***PURPOSE Save and recall error message control parameters.
6 C***CATEGORY R3C
7 C***TYPE ALL (IXSAV-A)
8 C***AUTHOR Hindmarsh, Alan C., (LLNL)
9 C***DESCRIPTION
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.
23 C On input..
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.
31 C On return..
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)
37 C 921118 DATE WRITTEN
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-----------------------------------------------------------------------
47 C**End
48 LOGICAL ISET
49 INTEGER IPAR, IVALUE
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-----------------------------------------------------------------------
56 SAVE LUNIT, MESFLG
57 DATA LUNIT/-1/, MESFLG/1/
59 C***FIRST EXECUTABLE STATEMENT IXSAV
60 IF (IPAR .EQ. 1) THEN
61 IF (LUNIT .EQ. -1) LUNIT = IUMACH()
62 IXSAV = LUNIT
63 IF (ISET) LUNIT = IVALUE
64 ENDIF
66 IF (IPAR .EQ. 2) THEN
67 IXSAV = MESFLG
68 IF (ISET) MESFLG = IVALUE
69 ENDIF
71 RETURN
72 C----------------------- End of Function IXSAV -------------------------
73 END