Hi All,
This is my first post so apologies for any mistakes and let me know how to correct any - I have read the forum rules, the getting started zip folder, so hopefully I won't mess things up
I have a two dimension array defined in Process_global for starter, so is there any way that I can pass the variable from sub service_create to the declared array?
Note: removing the line Public TwoDarray(xarr,yarr) As String from process_global and placing in service_create is working fine, but I am trying to pass the variable from service_create as I have DB that the size of the array will be based on it, then the array will be called from Main activity
Thank you for your help on this!
This is my first post so apologies for any mistakes and let me know how to correct any - I have read the forum rules, the getting started zip folder, so hopefully I won't mess things up
I have a two dimension array defined in Process_global for starter, so is there any way that I can pass the variable from sub service_create to the declared array?
B4X:
Sub Process_Globals
Public xarr As Int
Public yarr As Int
Public TwoDarray(xarr,yarr) As String '<---- to this array
End Sub
Sub Service_Create
xarr = 2 '<--I want to pass this value
xarr = 2 ' <--I want to pass this value
TwoDarray(0,0) = "test1"
TwoDarray(0,1) = "test2"
TwoDarray(1,0) = "test3"
TwoDarray(1,1) = "test4"
Log(TwoDarray(0,0))
Log(TwoDarray(0,1))
Log(TwoDarray(1,0))
Log(TwoDarray(1,1))
End Sub
Note: removing the line Public TwoDarray(xarr,yarr) As String from process_global and placing in service_create is working fine, but I am trying to pass the variable from service_create as I have DB that the size of the array will be based on it, then the array will be called from Main activity
Thank you for your help on this!