web 2.0

ASP/VBScript UBound()

ASP/VBScript UBound() Returns the highest available subscript for the indicated dimension of an array.

ShotDev Focus:
- Using ASP and UBound.

Example

asp_ubound.asp


<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim i,arrVar(4,1)
arrVar(0,0) = 1
arrVar(0,1) = 1.1
arrVar(1,0) = 2
arrVar(1,1) = 2.2
arrVar(2,0) = 3
arrVar(2,1) = 3.3
arrVar(3,0) = 4
arrVar(3,1) = 4.4
arrVar(4,0) = 5
arrVar(4,1) = 5.5

For i = LBound(arrVar) To UBound(arrVar)
Response.write arrVar(i,0)&" - "&arrVar(i,1)&"<br>"
Next
%>
</body>
</html>

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

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

Screenshot

ASP/VBScript UBound()

.
.
.
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.