Please disregard the actual code, since it's just a proof of concept; the actual use case is way more elaborated but the core issue is the same
Does a Const variable, declared inside a loop, gets initialized at every loop iteration, or just once at program initialization (since it's a constant)?
Here, the a() array is built and discarded 1000 times or just once?
Does a Const variable, declared inside a loop, gets initialized at every loop iteration, or just once at program initialization (since it's a constant)?
B4X:
For i = 0 To 1000
Dim Const a() As Int = Array As Int(1, 2, 3, 4, 5)
Log(a(1))
Next
Here, the a() array is built and discarded 1000 times or just once?