array_new_i1d_lb Subroutine

private subroutine array_new_i1d_lb(array, DATA, lb)

Arguments

Type IntentOptional Attributes Name
type(array_i1d_obj), intent(out) :: array
integer, intent(in), DIMENSION(:) :: DATA
integer, intent(in) :: lb

Source Code

   SUBROUTINE array_new_i1d_lb(array, DATA, lb)
      TYPE(array_i1d_obj), INTENT(OUT)                   :: array
      INTEGER, DIMENSION(:), INTENT(IN)                  :: DATA
      INTEGER, INTENT(IN)                                :: lb

      INTEGER                                            :: ub

      ALLOCATE (array%low)
      array%low%refcount = 1
      ub = lb + SIZE(DATA) - 1
      ALLOCATE (array%low%data(lb:ub))
      array%low%data(:) = DATA(:)
   END SUBROUTINE array_new_i1d_lb