Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 5th, 2003, 04:59 PM
crackerweb crackerweb is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 786 crackerweb User rank is Private First Class (20 - 50 Reputation Level)crackerweb User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 18 h 16 m
Reputation Power: 6
Cool storing in an array

if i have numbers 1 to 20 how can i store these numbers at run time? or i want the array not just to store 20 numbers but also 15 or 25 or 60 or 10 or 100 numbers at run time. Please show the codes

Reply With Quote
  #2  
Old October 5th, 2003, 10:52 PM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,174 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 27 m 59 sec
Reputation Power: 111
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
So.. what you're looking for is a dynamically declared array? You can declare one like this

dim XArray() as integer
dim intI as integer
dim XValue as integer

XValue = YourValue

for intI = 1 to XValue
redim preserve XArray(intI)
XArray(intI) = StoredValue
next inti


VB 6 is very limited in what you can do with dynamically declared arrays, especially in the face of languages like C++ and JAVA. VB.Net is a little different, though - but I'm still learning the ins and outs of that one.
__________________
Fisherman

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein

Reply With Quote
  #3  
Old October 6th, 2003, 04:09 PM
crackerweb crackerweb is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 786 crackerweb User rank is Private First Class (20 - 50 Reputation Level)crackerweb User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 18 h 16 m
Reputation Power: 6
ok i'll try thnks in advance

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > storing in an array


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway