logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Emerging Music
Home Improvement
Comedy Movies
Vision Issues
Jewelry Collecting
Feng Shui
Appalachia


dailyclick
All times in EST

Full Schedule
g
g ASP Site
Editor Wanted
BellaOnline's ASP Editor

g

UBound ASP Array Function

Guest Author - Lisa Shea

The UBound function lets you find out what the top defined array member is. This makes it easy for you to loop through an array from start to finish.

Let's say you use the split function to parse out a string into an array. So you do:

Dim ListArray

SentStr = "Four score and seven years ago our fathers brought forth"
ListArray = split(SentStr, " ")

Now you have an array ListArray that you want to cycle through, but you don't know how far to go. How do you know when you've reached the end?

The answer is the ubound function. ubound gives you the topmost array member of an array. In this case, the array has 10 words in it. Since arrays always start numbering at zero, this means array spots 0 through 9 are taken. If you do

ubound(ListArray)

the result is 9.

You can then easily do a loop through the members, operating on each one -

for loopctr = 0 to ubound(ListArray)
response.write ListArray(loopctr)
next

ASP Array Function List

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.

This site needs an editor - click to learn more!

RSS | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


Add UBound+ASP+Array+Function to Twitter Add UBound+ASP+Array+Function to Facebook Add UBound+ASP+Array+Function to MySpace Add UBound+ASP+Array+Function to Del.icio.us Digg UBound+ASP+Array+Function Add UBound+ASP+Array+Function to Yahoo My Web Add UBound+ASP+Array+Function to Google Bookmarks Add UBound+ASP+Array+Function to Stumbleupon Add UBound+ASP+Array+Function to Reddit



For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2012 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.

g


g features
Best uses for RSS

RSS and its future.

Force Download Dialog box with ASP

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Fav Social Network
Facebook
Twitter
Google+
other / none



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2012 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor