Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Type ItemR (Rr As Double, RX As Double,RY As Double,idx As String)
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.
End Sub
Sub Activity_Create(FirstTime As Boolean)
SomeNumber = 12 'Just to get it to work
Dim myarray(128) As ItemR 'dim an array as our custom structure
For m = 0 To 127
myarray(m).Rr = somenumber
myarray(m).RX = somenumber
myarray(m).RY = somenumber
myarray(m).idx = "sometext"
Next
Dim maxvalue1 As Int = 0 'Find the max value
For Each item As ItemR In myarray
If item.Rr > maxvalue1 Then maxvalue1 = item.Rr
Next
Log(maxvalue1)
End Sub