Page 1 of 1

How best to deal with unknown data size with an Array or Data command

Posted: Thu Aug 25, 2016 1:44 pm
by highfell
Hi all

Just seen this App in the store and purchased it with much enthusiasm.

I am looking to create a program that is a cross between a project management/to do program.

In setting up the program, one of the initial challenges is how to deal with an unknown maximum amount of data. Can I program some kind of dynamic Array command or Data command to deal with adding new information? Or am I best to create for example an Array to begin with using the DIM command like this DIM Array (10000,10000,10000) - on the basis that the users won't ever input more than 10,000 say items.

Thanks for any advice.

Re: How best to deal with unknown data size with an Array or Data command

Posted: Thu Aug 25, 2016 7:48 pm
by rbytes
Smart BASIC allows for dimensioning arrays using variables. You could start by dimensioning your arrays as small as (1000, 1000, 1000), and redimensioning them larger when critical values reach a certain point. Redimensioning would clear all data in the array, but this would not be a problem if you are doing regular saves to data files. Your code could do a save before the redimensioning, and a load afterward.

Re: How best to deal with unknown data size with an Array or Data command

Posted: Fri Aug 26, 2016 7:54 pm
by highfell
Many Thanks. So that would resolve my issue, if needed.

I am just re-acquainting myself with basic after many years, so expect some noobish questions .....

Sometimes it is easier to ask rather than spend days puzzling what the issue is. :mrgreen:

Re: How best to deal with unknown data size with an Array or Data command

Posted: Fri Aug 26, 2016 8:03 pm
by rbytes
I know what you mean. I had done a fair bit of previous programming when I discovered smart BASIC almost two years ago, but I had to learn from the ground up. I think my first program had 10 lines of code!

Re: How best to deal with unknown data size with an Array or Data command

Posted: Sat Aug 27, 2016 6:52 am
by Henko
highfell wrote:Hi all

Just seen this App in the store and purchased it with much enthusiasm.

I am looking to create a program that is a cross between a project management/to do program.

In setting up the program, one of the initial challenges is how to deal with an unknown maximum amount of data. Can I program some kind of dynamic Array command or Data command to deal with adding new information? Or am I best to create for example an Array to begin with using the DIM command like this DIM Array (10000,10000,10000) - on the basis that the users won't ever input more than 10,000 say items.

Thanks for any advice.
I started a project management program in 2014, but did not finish it. Maybe the GUI is of interest for you. The program is somewhere in the program section.
image.png
image.png (369.87 KiB) Viewed 2017 times

Re: How best to deal with unknown data size with an Array or Data command

Posted: Sun Aug 28, 2016 7:39 pm
by highfell
Henko wrote:
highfell wrote:Hi all

Just seen this App in the store and purchased it with much enthusiasm.

I am looking to create a program that is a cross between a project management/to do program.

In setting up the program, one of the initial challenges is how to deal with an unknown maximum amount of data. Can I program some kind of dynamic Array command or Data command to deal with adding new information? Or am I best to create for example an Array to begin with using the DIM command like this DIM Array (10000,10000,10000) - on the basis that the users won't ever input more than 10,000 say items.

Thanks for any advice.
I started a project management program in 2014, but did not finish it. Maybe the GUI is of interest for you. The program is somewhere in the program section. More to follow once I make some progress or need some more help

image.png
Thanks for this, very kind of you. I have though already decided on the concept of the program which is slightly different from the norm, and won't fit with your design.