ixsav.f

Go to the documentation of this file.
00001 *DECK IXSAV
00002       INTEGER FUNCTION IXSAV (IPAR, IVALUE, ISET)
00003 C***BEGIN PROLOGUE  IXSAV
00004 C***SUBSIDIARY
00005 C***PURPOSE  Save and recall error message control parameters.
00006 C***LIBRARY   MATHLIB
00007 C***CATEGORY  R3C
00008 C***TYPE      ALL (IXSAV-A)
00009 C***AUTHOR  Hindmarsh, Alan C., (LLNL)
00010 C***DESCRIPTION
00011 C
00012 C  IXSAV saves and recalls one of two error message parameters:
00013 C    LUNIT, the logical unit number to which messages are printed, and
00014 C    MESFLG, the message print flag.
00015 C  This is a modification of the SLATEC library routine J4SAVE.
00016 C
00017 C  Saved local variables..
00018 C   LUNIT  = Logical unit number for messages.
00019 C   LUNDEF = Default logical unit number, data-loaded to 6 below
00020 C            (may be machine-dependent).
00021 C   MESFLG = Print control flag..
00022 C            1 means print all messages (the default).
00023 C            0 means no printing.
00024 C
00025 C  On input..
00026 C    IPAR   = Parameter indicator (1 for LUNIT, 2 for MESFLG).
00027 C    IVALUE = The value to be set for the parameter, if ISET = .TRUE.
00028 C    ISET   = Logical flag to indicate whether to read or write.
00029 C             If ISET = .TRUE., the parameter will be given
00030 C             the value IVALUE.  If ISET = .FALSE., the parameter
00031 C             will be unchanged, and IVALUE is a dummy argument.
00032 C
00033 C  On return..
00034 C    IXSAV = The (old) value of the parameter.
00035 C
00036 C***SEE ALSO  XERMSG, XERRWD, XERRWV
00037 C***ROUTINES CALLED  NONE
00038 C***REVISION HISTORY  (YYMMDD)
00039 C   921118  DATE WRITTEN
00040 C   930329  Modified prologue to SLATEC format. (FNF)
00041 C   941025  Minor modification re default unit number. (ACH)
00042 C***END PROLOGUE  IXSAV
00043 C
00044 C**End
00045       LOGICAL ISET
00046       INTEGER IPAR, IVALUE
00047 C-----------------------------------------------------------------------
00048       INTEGER LUNIT, LUNDEF, MESFLG
00049 C-----------------------------------------------------------------------
00050 C The following Fortran-77 declaration is to cause the values of the
00051 C listed (local) variables to be saved between calls to this routine.
00052 C-----------------------------------------------------------------------
00053       SAVE LUNIT, LUNDEF, MESFLG
00054       DATA LUNIT/-1/, LUNDEF/6/, MESFLG/1/
00055 C
00056 C***FIRST EXECUTABLE STATEMENT  IXSAV
00057       IF (IPAR .EQ. 1) THEN
00058         IF (LUNIT .EQ. -1) LUNIT = LUNDEF
00059         IXSAV = LUNIT
00060         IF (ISET) LUNIT = IVALUE
00061         ENDIF
00062 C
00063       IF (IPAR .EQ. 2) THEN
00064         IXSAV = MESFLG
00065         IF (ISET) MESFLG = IVALUE
00066         ENDIF
00067 C
00068       RETURN
00069 C----------------------- End of Function IXSAV -------------------------
00070       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines