Computer Science Canada array!! plz help! |
Author: | bgmrk [ Mon Dec 12, 2005 10:12 pm ] |
Post subject: | array!! plz help! |
I must hav read over that darn tutorial like a hundred times but i just can'y seem to get it. could some1 plz make like an idiots guide to arrays and flexible arrays. PLZ it would be a great help. |
Author: | Geminias [ Mon Dec 12, 2005 10:23 pm ] | ||
Post subject: | |||
okay an array is just another way of saying a group of variables of the same type. an array is no different from a variable. you know a variable can be called "apple" well, if you had 10 apples, and you had to differentiate between them, instead of writing out the code: var apple1, apple2, apple3, apple4 .. apple10 : int you could just say: var apples : array 1 .. 10 of int now when you say: apples (1) you are referring to the variable apples (1) and it can be changed like any other variable of type int. The great thing about arrays is you can use for loops to edit them. for instance.
if this made sense to you reply back and i'll talk about flexible arrays.[/code] |
Author: | bgmrk [ Tue Dec 13, 2005 5:06 pm ] |
Post subject: | |
ok i got it i've been practising a bit. seems pretty easy. i think i ready for flexible array |
Author: | GhostCobra [ Sat Dec 17, 2005 12:42 am ] | ||
Post subject: | |||
Some initialized flexible arrays. (btw didn't realize how hard it would be to understand, just pay attention to the flexible array setup and how I execute new for it.) It's a school program with GUI, so dont be shocked when you run it and go wth ![]() |