Vyom World.com Let's Touch the Sky Together!
 Home VyomWorld.com Home Free Magazines! VyomLinks.com Home JobsAssist.com Home Vyom Network Contact Us Jobs & Careers Resume Submitter Placement Papers IT Companies Directory Computer Jobs Interview Questions Online Exams Vyom Career eMag. Fun Screensavers New! Send FREE SMS! SMS Jokes Source Codes Library Source Codes Home ASP Source Codes C Source Codes C++ Source Codes COBOL Source Codes Java Source Codes Pascal Source Codes Submit Source Codes GATE GATE an Overview GATE Preparation Study Materal GRE GRE an Overview GRE Questions GRE Preparation GRE Universities TOEFL Preparation TOEFL Resources GMAT Preparation GMAT Resources MBA Preparation MBA Resources Networking Concepts Networking Concepts Testing Preparation Testing Resources Webmasters Free Traffic Builder Webmaster Articles Web Hosting Tutorials Hardware Tutorial 1500 Free eBooks New! FREE Publications
Vyom Career eMag.
 Get 9,000+ Interview Questions & Answers in an eBook. 9,000+ Interview Questions All Questions Answered 5 FREE Bonuses Free Upgrades Get it now!
Get 9,000+ Interview Questions with Answers in an eBook

Home >> Source Codes Library Home >> Language Home >> Category Home > > Item Description
Search Code Library

 Title Arrays to store data Description: Assigning an array size with a variable produces a variable unless the Redim command is used. Method #1: You know the size Method #2: the size is in a variable Hits: 2634 Since 25th November, 2003 Code: Select and Copy the Code arraysredim.asp <% ' this code Dim a_array(100) ' this code will fail x=100 Dim my_array(x) %> Assigning an Array size With a variable produces an Error unless the ReDim command Is used. arraysredimcorrect.asp <% Dim my_array() x=100 ReDim preserve my_array(x) my_array(20)="Hi!" my_array(40)="How are You" lowcount=LBound(my_array) highcount=UBound(my_array) Response.Write "lowcount=" & lowcount & ";highcount=" & highcount & "

" For counter=lowcount To highcount Response.Write counter & "   " Response.Write my_array(counter) & "
" Next %>

ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home