Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Finding size of loaded array

Author
Message
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Apr 2005 02:29
Hi All,

When I use the load array something$() command how can I check the size it.

If I use array count something$() all it return is a 1, what else should I be doing to get the total, I know how long the text file is at the moment but will be making it longer.

Works ok if I set my Dim statement to say 500, was hopeing to let the program set its self after it had load the array.

In Space No One can Hear You Scream! (When your comm Line is cut?)
Mr Bigger
19
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 14th Apr 2005 11:38
The array should be loaded into the array form which it was saved.
This is to insure recognition.However,you could try saving the size
into the array upon saving.I'm not sure if it would work.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th Apr 2005 03:16
Ok this is what I am doing, I am trying to run backwards by making my data file first then loading it into the program

trying not to use open file to read.

can do this if I make the dim statment large to start off but I trying to set that when I have loaded the data file.

anyone when any thoughts?

In Space No One can Hear You Scream! (When your comm Line is cut?)
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 16th Apr 2005 05:04
Quote: "trying not to use open file to read."


I tried to get around this as well. Never found a solution. Basically - I subscribe to the philosiphy "go with what works." Quite honestly, when it comes to saving and loading arrays, using Open File to Write and Open File to Read works. The Save Array command is very limited in what it can do - and for what I needed it to do, it wouldn't work at all. So, I wrote a specialized Save_Array() function that would save the array as needed. The problem was that there is no way to make the function universal so it will work with other arrays - it will only work with the one it was designed for. This is a big restriction in DBPro, but it's only an annoying one, not a show-stopper.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Login to post a reply

Server time is: 2024-09-23 17:24:13
Your offset time is: 2024-09-23 17:24:13