vec_int64_as_array Function

private pure function vec_int64_as_array(self) result(copy)

A copy holding exactly size() elements.

Type Bound

vector_int64_t

Arguments

Type IntentOptional Attributes Name
class(vector_int64_t), intent(in) :: self

Return Value integer(kind=int64), allocatable, (:)


Source Code

   pure function vec_int64_as_array(self) result(copy)
      !! A copy holding exactly `size()` elements.
      class(vector_int64_t), intent(in) :: self
      integer(int64), allocatable :: copy(:)

      allocate (copy(self%n_items))
      if (self%n_items > 0) copy = self%items(1:self%n_items)
   end function vec_int64_as_array