Alright guys, I've been looking for the answer for this here for a few weeks, and even started getting out on the web looking for help. So hopefully if one of you can help me, it will help alot of others too.
I know that there's no way to define multidimensional arrays besides doing something like
for a 4D array.
I've boiled what I'm trying to do down to a real basic program.
Sub Process_Globals
'These global variables will be declared once when the application starts.
What I'm expecting is something like this. (without the dots I couldn't make it look right otherwise)
Test
.......Test
..............Test
.....................Test
..............................
If someone could point me in the direction of why this isn't working I would be eternally grateful, because I'm absolutely stuck on this :BangHead:
Thanks!
I know that there's no way to define multidimensional arrays besides doing something like
B4X:
array(a,b,c,d)
I've boiled what I'm trying to do down to a real basic program.
Sub Process_Globals
'These global variables will be declared once when the application starts.
B4X:
'These variables can be accessed from all modules.
Dim Matrix(X,Y) As String
Dim X As Int
Dim Y As Int
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Button1 As Button
Dim Button2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout ("MatrixEg")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button2_Click
X = X + 1
Y = Y + 1
Log(Matrix)
Log(X)
Log(Y)
End Sub
Sub Button1_Click
For X = 0 To X - 1
For Y = 0 To Y-1
Matrix(X,Y) = "Test"
Next
Next
End Sub
Test
.......Test
..............Test
.....................Test
..............................
If someone could point me in the direction of why this isn't working I would be eternally grateful, because I'm absolutely stuck on this :BangHead:
Thanks!