Hi Dave,
You first dim your array with just () or parens.
At any time you can add to or delete from the array using the redim
statement.
Now, to preserve existing data you use the word preserve. without that word
all data in your array is lost.
Now the next thing is you can increase size or dimensions but can not do
the reverse. ReDim takes the last dimension and increases it, or adds
another dimension on to it.
So you can erase the entire array by just given it a dim or redim
command.
Format:
'In the app body or init section
Dim YourArray()
' Make an initial size of 40 with no data inside.
ReDim YourArray(40)
' When Inside sub or functions increase the size:
ReDim Preserve YourArray(6000)
' To Increase dimensions:
ReDim Preserve YourArray(6000, 4)
'Note:
' Remember you can not go backward or any data in those dimensionns or
locations will be lost.
'Such as
ReDim Preserve YourArray( 6000, 2)
'You have lost all data in the 3'rd and 4'th dimensions.
ReDim Preserve YourArray(6000)
'You lost all data in the second dimension.
ReDim Preserve YourArray(40)
'You are now down your original size and all data above that is lost.
I hope this helps. Any saving of data for future useage either put them
in an iniFile or external file as mentioned by others.
Bruce
Sent: Tuesday, February 28, 2012 12:22 PM
Subject: RE: Very Large Array Storage
Hello,
Thanks for your reply. I'm not actually polling anything. I refered
to the collection (not a technical term, just a set) of arrays to
hold integers in an organized manner. They are more like mapping
arrays and ordered integers. An anology would be an static array of
of dynamic arrays like a list of variable length strings.
Thanks...
Dave
At 07:56 AM 2/28/2012, you wrote:
>What kind of database are you pulling from? Will you be using SQL to
>perform
>the retrieval?
>
>-----Original Message-----
>From: David Helkenn [mailto:[email protected]]
>Sent: Tuesday, February 28, 2012 8:55 AM
>To: [email protected]
>Cc: [email protected]
>Subject: Very Large Array Storage
>
>Hello,
>I want to write an app that will require a fairly large database organized
>in arrays. There are around 8500 integer elements to be stored in some 35
>arrays. I thought I could have a static array of the 35 dynamic arrays
>containing the integers. However, I do not know how to get all that data
>initialized prior to the invokation of the rest of the app. How do I get
>that data known to the app?
>
>The behavior from a very high view, is the user presses the activation
>hotkey, the controls are displayed in the dialog and the database is
>available for use. I do not know how long it will take to create the
>database, but it is subject to an easily implemented algorithm.
>
>I am hoping to have this app as global. Will I need to use a file? If so,
>where is the documentation related to the file system? I find only a
>file/dir related document but there is no FSO in the GW toolkit. Help
>please.
>
>Using Windows7pro64 and WE 7.5.3.
>
>Thanks...
>
>Dave