Learn to use arrays with this tutorial. Array() function. Arrays in vbscript and asp.
True Type Fonts
Download thousands of free fonts.
Download Here.
Device Drivers
DirectX
VBrun Files
By Peripheral:


All Drivers
Dll Search
Download Dll Files
Enter The Dll Name:
Paco's Screensaver
Download The Official Paco's Drivers Screensaver.
Check It Out
Computer Maintenance
File Systems
Hardware
Over Clocking
Registry
Surf 2X Faster
Desktop Enhancements
Anime
Icons
Screensavers
Themes
Site Search:

Free Software
Anti-Virus
Audio Tools
E-Mail Clients
Firewalls
Graphic Editors
Web Development
ASP/VBScript
CGI Script
HTML
JavaScript
Paco's Own Scripts
Webmasters Tools
Were Listed @

Aspin.com

ScriptSearch.com

Arrays in plain English.
Arrays are without a doubt mans best friend. Sorry dogs but I think you now come in second. There are many ways to use arrays. Here are a couple of quick examples:

<%

Dim arrPaco(2)

arrPaco(0) = "Paco's"

arrPaco(1) = " "

arrPaco(2) = "Drivers"

Response.Write arrPaco(0) & arrPaco(1) & arrPaco(2)

%>

The result would be: Paco's Drivers

Now you may be wondering, Why did he dimension his array as 2 when there are three parts to it. Well, arrays are ZERO based so even though there are three parts, it actually counts the first as zero, so instead of it counting 1, 2, 3, it counts 0, 1, 2.

Now let's go a little further and Split a string into an array.

<%

Dim strPaco, arrPaco

strPaco = "Learn about arrays at Paco's"

arrPaco = Split(strPaco," ")

For i = 0 to UBound(arrPaco)

Response.Write arrPaco(i) & "<br>"

Next

%>

This would write:

Learn
about
arrays
at
Paco's

Here's basically what happened.

Split() took the string and cut it up every where it found a blank space. This gave us each individual word. For i = 0 is starting a loop and setting i to zero which is the lowest number in an array. Now to UBound(arrPaco) is telling the loop how many times to loop. UBound simply means UPPER BOUND or the highest number in the array. In this case it said start at 0 and loop to 4 (this gives us 5 remember arrays are ZERO based. The next line:

Response.Write arrPaco(i) & "<br>"

arrPaco(i) What is the i there for? remember we told this loop i = 0. Now why is the an ampersand and a break tag?

Well, the & is used to concatenate (glue together) the break tag and the array so it will write the array and then move down a line when it performs it' next action. The word NEXT tells it to do it all over again with the next word in our array.

And there it is, a very basic, simply spoken set of array examples.

To get a grasp of the split function look here.

Someday arrays will come in useful to you. If you want to see a working example of one, take a look at Simple Counter Using Graphics


Search The Web Using Paco's MetaSearch
  
any   all   phrase
 About  Factmonster  AlltheWeb   
 MSN  Yahooligans      
Arts
Movies, Television, Music...
Business
Jobs, Industries, Investing...
Computers
Internet, Software, Hardware...
Games
Video Games, RPGs, Gambling...
Health
Fitness, Medicine, Alternative...
Home
Family, Consumers, Cooking...
Kids and Teens
Arts, School Time, Teen Life...
News
Media, Newspapers, Weather...
Recreation
Travel, Food, Outdoors, Humor...
Reference
Maps, Education, Libraries...
Regional
US, Canada, UK, Europe...
Science
Biology, Psychology, Physics...
Shopping
Autos, Clothing, Gifts...
Society
People, Religion, Issues...
Sports
Baseball, Soccer, Basketball...
World
Deutsch, Español, Français, Italiano, Japanese, Nederlands, Polska, Svenska...
Help build the largest human-edited directory of the web
Stop Popups
Paco's Popup Plucker.
Eliminate those pesky popups!
Users Online
Currently 29 users at PacosDrivers.com
Paco's Online

Send this page to a friend
Report Broken Links
Invalid path or path does not have write access: e:\www\dtruman\pacosdrivers.com\wx\weather\
Hosted By
ChamberGates

Privacy Policy
Best Viewed At 1024 X 768 Or Higher
Copyright © 2000-2010 Pacosdrivers.com. All Rights Reserved.