0% found this document useful (0 votes)
26 views1 page

Array To Store Data in

Assigning an array size with a variable produces an error unless the redim command is used. Arraysredimcorrect.asp " for counter=lowcount to highcount response.write counter and "

Uploaded by

api-26891935
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

Array To Store Data in

Assigning an array size with a variable produces an error unless the redim command is used. Arraysredimcorrect.asp " for counter=lowcount to highcount response.write counter and "

Uploaded by

api-26891935
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<html><head>

<title>arraysredim.asp</title>
</head><body bgcolor="#ffffff">
<%
' this code
dim a_array(100)

' this code will fail


x=100
dim my_array(x)

%>
</body></html>

assigning an array size with a variable produces an error unless the redim command
is used.

<html><head>
<title>arraysredimcorrect.asp</title>
</head><body bgcolor="#ffffff">
<%
dim my_array()
x=100
redim preserve my_array(x)
my_array(20)="hi!"
my_array(40)="how are you"

lowcount=lbound(my_array)
highcount=ubound(my_array)
response.write "lowcount=" & lowcount & ";highcount=" & highcount & "<p>"
for counter=lowcount to highcount
response.write counter & " "
response.write my_array(counter) & "<br>
next

%>
</body></html>

You might also like