assign_element Subroutine

private pure subroutine assign_element(lhs, rhs)

Operator =.

Arguments

Type IntentOptional AttributesName
class(element_object), intent(inout) :: lhs

Left hand side.

type(element_object), intent(in) :: rhs

Right hand side.


Source Code


Source Code

   pure subroutine assign_element(lhs, rhs)
   !< Operator `=`.
   class(element_object), intent(inout) :: lhs !< Left hand side.
   type(element_object),  intent(in)    :: rhs !< Right hand side.

   if (allocated(rhs%string)) lhs%string = rhs%string
   if (allocated(rhs%color_fg)) lhs%color_fg = rhs%color_fg
   if (allocated(rhs%color_bg)) lhs%color_bg = rhs%color_bg
   if (allocated(rhs%style)) lhs%style = rhs%style
   endsubroutine assign_element