ixsav Function

function ixsav(Ipar, Ivalue, Iset)

Uses

  • proc~~ixsav~2~~UsesGraph proc~ixsav~2 ixsav.inc::ixsav iso_fortran_env iso_fortran_env proc~ixsav~2->iso_fortran_env

Name

ixsav(3f) - [M_odesave::matrix] Save and recall error message control parameters.

Synopsis

function ixsav(Ipar,Ivalue,Iset)
integer            :: ixsav

integer,intent(in) :: Ipar
integer,intent(in) :: Ivalue
logical,intent(in) :: Iset

Description

IXSAV always recalls the current value of one of two error message control flags.

It also can set new values to return for subsequent queries if Iset=.true.

This is a modification of the SLATEC library routine J4SAVE.

Saved local variables..

LUNIT

Logical unit number for messages.

MESFLG

Print control flag..

   1 means print all messages (the default).
   0 means no message printing.

Options

IPAR

Parameter indicator (1 for LUNIT, 2 for MESFLG).

IVALUE

The value to be set for the parameter, if ISET = .TRUE.

ISET

Logical flag to indicate whether to read or write. If ISET = .TRUE., the parameter will be given the value IVALUE. If ISET = .FALSE., the parameter will be unchanged, and IVALUE is a dummy argument.

Returns

IXSAV
The (old) value of the parameter.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: Ipar
integer, intent(in) :: Ivalue
logical, intent(in) :: Iset

Return Value integer


Variables

Type Visibility Attributes Name Initial
integer, public, save :: lunit = stdout
integer, public, save :: mesflg = 1

Source Code

function ixsav(Ipar,Ivalue,Iset)
use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, &
                                         stdout=>output_unit, &
                                         stderr=>error_unit

integer            :: ixsav

integer,intent(in) :: Ipar
integer,intent(in) :: Ivalue
logical,intent(in) :: Iset

integer,save :: lunit = stdout
integer,save :: mesflg = 1

   select case(Ipar)

   case(1) ! lunit
      ixsav = lunit
      if ( Iset ) lunit = Ivalue

   case(2) ! mesflg
      ixsav = mesflg
      if ( Iset ) mesflg = Ivalue

   case default
      stop '*ixsav* unknown value for Ipar'

   end select

end function ixsav