Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

HTML Reference
Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

UBound

The UBound function returns the upper bound or largest possible index that may be used on an array.

You can think of this function as returning the size of the array. Although it is not really the size of the array since the arrays are indexed starting at zero. So even though the last valid index to an array of size 10 is 10, the indices range from 0 to 10 giving you a size of 11 elements.

Dim aArray
aArray = Array(10)
Response.Write "UBound(aArray) = " & UBound(aArray) & "<BR>"
Dim aArray2
aArray2 = Array(0)
ReDim aArray2(10)
Response.Write "UBound(aArray2) = " & UBound(aArray2)


Active Server Pages also provides a lower bound function LBound although it doesn't really serve any purpose since all arrays in ASP must start from zero. This means the LBound function will always return zero.

Orvado Technologies

ASP Nuke CMS
Free Open Source
Content Manager
HomeFix Boards
Home Remodeling
Message Boards

Contact Us | Contribute | About | Site Map



"Democracy consists of choosing your dictators, after they've told you what it is you want to hear." - Alan Coren

©2007 Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.