Small fix to Johans Vector class

Small fix to the removeElementAt(Integer) method – changes in bold.

Public Function removeElementAt(index As Integer)
   If index >= Me.size() Then Error 2000, "Array index [" & index & "] out of bounds [" & size & "]"
   Dim members As Variant
   Dim i As Integer
   Dim j As Integer
   Redim members(Me.size())
   j=0
   For i = 0 To Me.size-1
      If (i  index) And (Not j > Me.size()) Then
         If Isobject(array(i)) Then
            Set members(j) = array(i)
         Else
            members(j) = array(i)
         End If
         j = j + 1
      End If
   Next i
   elementLength = elementLength - 1
   array = members
End Function

Published by

lekkim

Positive, competent, out-spoken, frank and customer focused architect and developer with a strong foundation in web, cloud and product development. I'm a strong advocate for API first and cloud based solutions and development. I have a knack for being able to communicate and present technically complicated matters in conference, customer and training settings. I've previously acted as team member and leader in a product organisation.