rav_chow
asked on
integer array?
Do we have integer arrays in ASP. If yes, how can i work with them?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<%
Function cleanArray(tarr)
arr = tarr
FOR i = 0 TO UBOUND(arr)
IF(arr(i) = "" AND i < UBOUND(arr))THEN
arr(i) = arr(i + 1)
arr(i + 1) = ""
END IF
NEXT
count = 0
FOR i = 0 TO UBOUND(arr)
IF(arr(i) <> "")THEN
count = count + 1
END IF
NEXT
REDIM PRESERVE arr(count)
cleanArray = arr
End Function
dim arra(6)
arra(0) = "Hello"
arra(1) = "Hi"
arra(2) = "asp"
arra(3) = ""
arra(4) = "weeeee"
arra(5) = ""
'narra will now be a clean version of arra
narra = cleanArray(arra)
FOR i = 0 TO UBOUND(narra)
Response.Write(narra(i) & "<BR>")
NEXT
%>