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

Free Components

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, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"f u cn rd ths, u cn gt a gd jb n cmptr prgmmng." - Anon

©2012 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.