I noticed some users do this eg:
B4X:
Sub GetMaxValue(arrInt() As Int) As Int
If arrInt.Length = 1 Then Return arrInt(0)
Private i As Int 'not sure what the point/benefit is of declaring this with Private
Dim iResult As Int
iResult = arrInt(0)
For i = 1 To arrInt.Length - 1
If arrInt(i) > iResult Then iResult = arrInt(0)
Next
Return iResult
End Sub
[CODE]
Could somebody explain what the benefit/purpose is to declare the variable i using Private rather than Dim in this case?
RBS