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.

Author
Message
sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 24th Jun 2003 07:07
I'm just learning, so I'm trying out different things.
I got where i can print, input, arithmic, add bitmaps and sounds,
now...I want to be able to store information and add to it.

like.. say a batting average for baseball. how can I save that info then add updated info.
Do I use " dim ,battingavg " or what. I have the user manual but the commands are vague in some cases.
thanks
philippians 4:13
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 24th Jun 2003 09:31
ok the best way to describe an array to someone new is this way.

Imagine those cardboard egg cartons that have 2 rows and either 6 or 3 columns.

Now imagine those other trays that are stacks of layers of 12 x 12 pockets.

An array can be imagined like this but theres some extra things you have to keep in mind.

You cant eggs as the data here so they reserve the option for you to make arrays of strings or words as well as decimal point numbers and integers.


when you count the row and column pockets start from zero

dim myarray(4)

would actually be 5 spaces and only one row wide.

[0][1][2][3][4]

In some situations you can skip using the zero location altogether for neater code or some problem at hand.


now lets look at a standard eg carton shape

dim myeggcarton(6,1)

its really like this

[0][1][2][3][4][5][6]
[0][1][2][3][4][5][6]

lets fill the data now

myeggcarton(1,1) = 5

now our data would look like this

[][5][][][][][]
[][5][][][][][]


if we wanted to fill the data up without declaring each line by hand we deploy a loop

for r = 0 to 6
for c = 0 to 2
myeggcarton(r,c)=5
next r
next c



HeHe Anyway...


www.dbheaven.com has a great tutorial for new users about arrays and other starting problems.

Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 24th Jun 2003 13:44 Edited at: 24th Jun 2003 13:45
oops! thats a typo

Quote: "
myeggcarton(1,1) = 5

now our data would look like this

[][5][][][][][]
[][5][][][][][]
"



should be

myeggcarton(1,1) = 5

now our data would look like this

[] [] [][][][][]
[][5][][][][][]

cos you only altered 1,1, not 0,1, I know...I know!, you use them all the time and as soon as you have to explain them it all goes pear shaped

Mentor.

indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 24th Jun 2003 14:44
thanks your correct, see www.dbheaven.com for a better explination

sinkler20
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location: United States
Posted: 24th Jun 2003 16:01
thanks guys for the help.

philippians 4:13

Login to post a reply

Server time is: 2026-07-05 22:36:53
Your offset time is: 2026-07-05 22:36:53