web 2.0

How to use ASP & ASP/VBScript ReDim

How to use ASP & ASP/VBScript ReDim This the tutorial/example a scripts how to use ASP & ReDim declare array variable.

ShotDev Focus:
- ASP & ReDim declare array variable .

Option Explicit (When Option Explicit appears in a file, you must explicitly declare all variables using the ReDim)

Example

asp_redim.asp


<%
Option Explicit
%>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim i
Dim n,m
n = 3
m = 4
ReDim arrVar(n+m)
For i = 0 To n+m
arrVar(i) = i + 10
Next

'*** Write Array ***
For i = 0 To UBound(arrVar)
Response.write(arrVar(i)&"<br>")
Next
%>
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_redim.asp

Screenshot

ASP & ReDim

.

.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.