Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(real4_container), | intent(in) | :: | this | |||
class(*), | intent(inout) | :: | lhs |
Transfers the container's contents to the variable on the left hand side of the equals sign if it is of the correct type.
logical function real4_guard(this, lhs) result(ret)
!! Author: Chris MacMackin
!! Date: December 2015
!!
!! Transfers the container's contents to the variable on the left
!! hand side of the equals sign if it is of the correct type.
class(real4_container), intent(in) :: this
class(*), intent(inout) :: lhs
select type(lhs)
type is(real(r4))
lhs = transfer(this%contents(), lhs)
ret = .true.
class default
ret = .false.
end select
end function real4_guard