ASP Classic是否等同于PHP unset(array1[3])
函数?
答案 0 :(得分:3)
我认为这样做,对于数值数组,至少:
sub unset(array, index)
if index < lbound(array) or index > ubound(array) then exit sub
dim i, move
move = false
for i = lbound(array) to ubound(array)
if i = index then move = true
if move and i < ubound(array) then
array(i) = array(i + 1)
end if
next
redim preserve array(i - 2)
end sub