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
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 24th Dec 2010 23:26
I cant seem to find the perfect simple tutorial on how to use arrays.
could someone create a simple little code snip-it on using arrays and explain it? I understand that they are used to store information, but i dont understand on how to use the function.

onhcet d(-_-)b techno
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 24th Dec 2010 23:59 Edited at: 25th Dec 2010 00:01
Arrays are just like individual variables, they store things that can be accessed with an index into the array

the variable a=10 stores the value 10
so does the first element in the b array b(1)=10
the 1 tells which item in the b array to use.

The cool thing about arrays is they are easy to use in loops


Good Luck
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 25th Dec 2010 00:06
so they are pretty much like variables, except you can use letters to store functions and variables? Great simple tutorial!

onhcet d(-_-)b techno
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th Dec 2010 00:13 Edited at: 25th Dec 2010 00:14
More like you can use arrays to store values and strings, just like variable can, but I think you got it.
Glad it helped.
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 25th Dec 2010 00:16
so how could i use this to make a simple count down looping app. like 10 to 0 then start over.

onhcet d(-_-)b techno
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 25th Dec 2010 00:17
wait! why do we use "dim"? what does it express and stand for?

onhcet d(-_-)b techno
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th Dec 2010 00:44 Edited at: 25th Dec 2010 00:56
The f1 help key is your friend!
In the DBPro editor, highlight a command you want info on and press f1,
I use it all the time.
Dim - says to dimension the array for use,
basically setting aside the array storage for later use by your program.

Counts up or down example


Don't forget to try the 'Principles' and 'Examples' in the f1 Help Menu
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 25th Dec 2010 00:56
im not getting it, i want to make a simple countdown timer from 10 to 0 then start over at 10. but i cant figure it out?

onhcet d(-_-)b techno
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th Dec 2010 01:46 Edited at: 25th Dec 2010 01:51
you said count down looping....

so here is a count down variable


Now you are saying timer.....a clock timer is another matter


Make sure you try the code people suggest, study it, try your own modifications,
and post YOUR code here for us to help with, and don't just ask for the code from us without showing some of your own code.
It's always best to try something yourself, then post your code when asking for help
Good Luck!
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 25th Dec 2010 13:11
Dim is short for dimension.

Login to post a reply

Server time is: 2026-07-21 20:34:53
Your offset time is: 2026-07-21 20:34:53