Array element
Tom Ogilvy wrote:
a P Daulton has implied, there is no command to delete an element of an
array.
j = 1
for primat = 1 to 50
if newarr(primat) < 15 then
newarr(j) = newarr(primat)
j = j + 1
end if
Next
for i = j to 50
newarr(i) = 0
Next
might be what you want.
If you substitute the following for the second loop you probably have it:
ReDim Preserve newarr(1 To j - 1)
Alan Beban
|