HomeAboutWeb DesignGraphicDesignPresentationContact

ASP Training 101

Webitcorp: Array Elements

Array Elements

Arrays are objects whose properties are identified by numbers representing their positions in the structure. Essentially, an array is a list of items.

iIndex has a value of 3
arrDays(1) has a value of Monday
arrDays(index) has a value of Wednesday
arrDays(2+3) has a value of Friday
arrDays(iIndex+1) has a value of Thursday

 

The Code

<%
Dim arrDays(6), iIndex
iIndex = 3
arrDays(0) = "Sunday"
arrDays(1) = "Monday"
arrDays(2) = "Tuesday"
arrDays(3) = "Wednesday"
arrDays(4) = "Thursday"
arrDays(5) = "Friday"
arrDays(6) = "Sunday"
Response.Write ("iIndex has a value of ")
Response.Write (iIndex)
%>
<br />
arrDays(1) has a value of
<% Response.Write(arrDays(1)) %>
<br />
arrDays(index) has a value of
<% Response.Write(arrDays(iIndex)) %>
<br />
arrDays(2+3) has a value of
<% Response.Write(arrDays(2+3)) %>
<br />
arrDays(iIndex+1) has a value of
<% Response.Write(arrDays(iIndex+1)) %>

Home | About | Web Design | Graphic Design | Presentations | Contact | Site Map | del.icio.us+del.icio.us

| Saint Lucie County, Florida | Rockland County, NY | Burgan County, NJ |


Port Saint Lucie Web Development , Graphic Design , Multimedia Presentations , and much more

Valid XHTML 1.0 Transitional

Copyright ©2007

Onenuttyweb.com