qreal32 = qreal64 assignment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(qreal32), | intent(inout) | :: | lhs | Left hand side. |
||
| type(qreal64), | intent(in) | :: | rhs | Right hand side. |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine qreal32_assign_qreal64(lhs, rhs)
!---------------------------------------------------------------------------------------------------------------------------------
!< `qreal32 = qreal64` assignment.
!---------------------------------------------------------------------------------------------------------------------------------
type(qreal32), intent(inout) :: lhs !< Left hand side.
type(qreal64), intent(in) :: rhs !< Right hand side.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
if (rhs%is_unit_defined()) then
lhs%magnitude = rhs%magnitude
if (allocated(rhs%name)) lhs%name = rhs%name
if (.not.lhs%is_unit_defined()) then
call lhs%allocate_unit
lhs%unit = rhs%unit
else
write(stderr, "(A)") 'error: cannot assign between "'//&
lhs%stringify(with_dimensions=.true., with_aliases=.true., with_name=.true., compact_reals=.true.)//&
'" and "'//&
rhs%stringify(with_dimensions=.true., with_aliases=.true., with_name=.true., compact_reals=.true.)//'"'
stop
endif
endif
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine qreal32_assign_qreal64