GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
ixsav.f
Go to the documentation of this file.
1*DECK IXSAV
2 INTEGER FUNCTION ixsav (IPAR, IVALUE, ISET)
3C***BEGIN PROLOGUE IXSAV
4C***SUBSIDIARY
5C***PURPOSE Save and recall error message control parameters.
6C***LIBRARY MATHLIB
7C***CATEGORY R3C
8C***TYPE ALL (IXSAV-A)
9C***AUTHOR Hindmarsh, Alan C., (LLNL)
10C***DESCRIPTION
11C
12C IXSAV saves and recalls one of two error message parameters:
13C LUNIT, the logical unit number to which messages are printed, and
14C MESFLG, the message print flag.
15C This is a modification of the SLATEC library routine J4SAVE.
16C
17C Saved local variables..
18C LUNIT = Logical unit number for messages.
19C LUNDEF = Default logical unit number, data-loaded to 6 below
20C (may be machine-dependent).
21C MESFLG = Print control flag..
22C 1 means print all messages (the default).
23C 0 means no printing.
24C
25C On input..
26C IPAR = Parameter indicator (1 for LUNIT, 2 for MESFLG).
27C IVALUE = The value to be set for the parameter, if ISET = .TRUE.
28C ISET = Logical flag to indicate whether to read or write.
29C If ISET = .TRUE., the parameter will be given
30C the value IVALUE. If ISET = .FALSE., the parameter
31C will be unchanged, and IVALUE is a dummy argument.
32C
33C On return..
34C IXSAV = The (old) value of the parameter.
35C
36C***SEE ALSO XERMSG, XERRWD, XERRWV
37C***ROUTINES CALLED NONE
38C***REVISION HISTORY (YYMMDD)
39C 921118 DATE WRITTEN
40C 930329 Modified prologue to SLATEC format. (FNF)
41C 941025 Minor modification re default unit number. (ACH)
42C***END PROLOGUE IXSAV
43C
44C**End
45 LOGICAL iset
46 INTEGER ipar, ivalue
47C-----------------------------------------------------------------------
48 INTEGER lunit, lundef, mesflg
49C-----------------------------------------------------------------------
50C The following Fortran-77 declaration is to cause the values of the
51C listed (local) variables to be saved between calls to this routine.
52C-----------------------------------------------------------------------
53 SAVE lunit, lundef, mesflg
54 DATA lunit/-1/, lundef/6/, mesflg/1/
55C
56C***FIRST EXECUTABLE STATEMENT IXSAV
57 IF (ipar .EQ. 1) THEN
58 IF (lunit .EQ. -1) lunit = lundef
59 ixsav = lunit
60 IF (iset) lunit = ivalue
61 ENDIF
62C
63 IF (ipar .EQ. 2) THEN
64 ixsav = mesflg
65 IF (iset) mesflg = ivalue
66 ENDIF
67C
68 RETURN
69C----------------------- End of Function IXSAV -------------------------
70 END
integer function ixsav(ipar, ivalue, iset)
Definition ixsav.f:3