uom_reference32 = uom_reference64 assignment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(uom_reference32), | intent(inout) | :: | lhs | Left hand side. |
||
| type(uom_reference64), | 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 uom_reference32_assign_uom_reference64(lhs, rhs)
!---------------------------------------------------------------------------------------------------------------------------------
!< `uom_reference32 = uom_reference64` assignment.
!---------------------------------------------------------------------------------------------------------------------------------
type(uom_reference32), intent(inout) :: lhs !< Left hand side.
type(uom_reference64), intent(in) :: rhs !< Right hand side.
type(uom_symbol64), allocatable :: rhs_aliases(:) !< RHS uom symbol aliases.
type(uom_symbol64) :: rhs_dimensions !< RHS dimensions.
type(uom_symbol32), allocatable :: lhs_aliases(:) !< LHS uom symbol aliases.
type(uom_symbol32) :: lhs_dimensions !< LHS dimensions.
integer(I_P) :: a !< Counter.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
if (rhs%is_defined()) then
if (.not.lhs%is_defined()) then
call rhs%get_aliases(aliases=rhs_aliases)
call rhs%get_dimensions(dimensions=rhs_dimensions)
if (allocated(rhs_aliases)) then
allocate(lhs_aliases(1:size(rhs_aliases, dim=1)))
do a=1, size(rhs_aliases, dim=1)
lhs_aliases(a) = rhs_aliases(a)
enddo
call lhs%set(aliases=lhs_aliases)
endif
if (rhs_dimensions%is_defined()) then
lhs_dimensions = rhs_dimensions
call lhs%set(dimensions=lhs_dimensions)
endif
else
write(stderr, "(A)") 'error: cannot assign between "'//&
lhs%stringify(with_dimensions=.true., with_aliases=.true.)//'" and "'//&
rhs%stringify(with_dimensions=.true., with_aliases=.true.)//'"'
stop
endif
endif
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine uom_reference32_assign_uom_reference64