PT
Developer Forums
Register
Login
[Archived] AppGameKit Classic Chat
->
Multidimensional Arrays within AGK
<
1
>
A
anwserman
Joined:
20th May 2011
Location:
Wisconsin
Posted:
30th Sep 2011 6:32
Could someone provide a tutorial on how to use multidimensional arrays within AppGameKit? I had issues using them with DBPro - so I avoided them - but a project I'd like to hammer out in AppGameKit would benefit heavily from them.
Also, what limitations and constraints are there with multiple dimension arrays within AppGameKit?
R
Rich Dersheimer
Joined:
1st Jul 2009
Location:
Inside the box
Posted:
30th Sep 2011 7:33
http://www.appgamekit.com/documentation/principles/1_datatypes.htm
About midway down the page, has examples of multi-dimensional arrays.
L
LeeBamber
Joined:
21st Jan 2000
Location:
England
Posted:
9th Oct 2011 3:57
A very simple implementation of a multidimensional array:
dim map[10,10]
do
map[5,5]=42
print(map[5,5])
sync()
loop
R
Rich Dersheimer
Joined:
1st Jul 2009
Location:
Inside the box
Posted:
10th Oct 2011 17:18
Tsk, tsk, Lee. You don't really want that assignment
inside
the loop, do you?
I mean, it works and all, but it's just taking up cycles.
X
XanthorXIII
Joined:
13th May 2011
Location:
Posted:
10th Oct 2011 23:54
Lee,
I think you meant
dim map[10,10]
map[5,5]=42
do
print(map[5,5])
sync()
loop
L
LeeBamber
Joined:
21st Jan 2000
Location:
England
Posted:
15th Oct 2011 6:11
Nicely spotted! Never let a performance boost pass you by!