set_conf_par_logical Subroutine

private subroutine set_conf_par_logical(this, logical_val)

Type Bound

CONF_PAR_LOGICAL

Arguments

Type IntentOptional Attributes Name
class(CONF_PAR_LOGICAL), intent(inout) :: this
logical, intent(in), optional :: logical_val

Source Code

   SUBROUTINE set_conf_par_logical(this, logical_val)
      CLASS(CONF_PAR_LOGICAL), INTENT(INOUT) :: this
      LOGICAL, INTENT(IN), OPTIONAL :: logical_val

      INTEGER :: my_integer_val

      IF (this%env_value(my_integer_val)) RETURN

      ! Use env value
      IF (this%source .EQ. 'E') THEN
         this%val = (my_integer_val .NE. 0)
         RETURN
      END IF

      ! Use User-code value
      IF (PRESENT(logical_val)) THEN
         this%val = logical_val
         this%source = 'U'
      END IF

   END SUBROUTINE set_conf_par_logical