incorrect value encountered:
variable_name = variable_value
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name_ |
name of the variable |
||
integer(kind=int32), | intent(in) | :: | value_ |
value of the variable |
||
integer(kind=int32), | intent(in), | optional | :: | unit_ |
optional, unit where the message will be written |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | private, | allocatable | :: | add_prefix_ | |||
character(len=20), | private | :: | tmp_ |
subroutine incorrect_value_int32(name_, value_, unit_)
!! ``incorrect value encountered:
!! variable_name = variable_value``
!---------------------------------------------------------------------!
character(len = *), intent(in) :: name_
!! name of the variable
integer(int32), intent(in) :: value_
!! value of the variable
integer(int32), optional, intent(in) :: unit_
!! optional, unit where the message will be written
!---------------------------------------------------------------------!
character(len = 20) :: tmp_
character(len = :), allocatable :: add_prefix_
!---------------------------------------------------------------------!
write(tmp_, '(i5)') value_
add_prefix_ = 'Incorrect value encountered: '//trim(name_)//' = '// &
trim(tmp_)
call write_error(add_prefix_, unit_)
!---------------------------------------------------------------------!
end subroutine incorrect_value_int32