B.1.12 Normal_Status Procedure

The main documentation of the Normal_Status Procedure contains additional explanation of this code listing.

  function Normal_Status (S) result(Normal)

    ! Input variable.

    type(Status_type), intent(in) :: S  ! Status to be checked.

    ! Output variable.

    type(logical) :: Normal             ! Normal condition boolean.


    ! Verify requirements.

    VERIFY(Valid_State(S),1)   ! S is valid.

    ! Set normal boolean.

    Normal = status_flag(S%status)%severity == 'Normal'

    ! Verify guarantees.

    ! Normal should be what it was set to.
    VERIFY(Normal .eqv. (status_flag(S%status)%severity == 'Normal'),2)

  end function Normal_Status

Michael L. Hall