Is it possible to have some Global Variables that have different names, and you create an array of those variable names so the actual original variables could be modified? (An array that would be a pointer to the actual storage area of that variable; so if you assigned a value to the array item, it would modify the Int.
Such as:
Is there any way to truly pass the value to the global variable from the array (or from a list... or anything?)
Such as:
B4X:
Sub Process_Globals
Dim ThisVariable as Int = 0
Dim ThatVariable as Int = 0
Dim TheOtherVariable as Int = 0
Dim ArrayOfInts()
ArrayOfInts = Array as Int(&ThisVariable,&ThatVariable,&TheOtherVariable) ' Where the & means _ something that would make this mean a POINTER to ThisVariable, etc.)
End Sub
Sub Activity_Create(FirstTime AsBoolean)
Dim z as Int
for z = 0 to 2
ArrayOfInts(z) = z
next
' Here, I would like to have changed the globals so that ThisVariable = 1, ThatVariable = 2, TheOtherVariable = 3
end sub
Is there any way to truly pass the value to the global variable from the array (or from a list... or anything?)