sometimes you need to check divisons with rest value.
The operator of Modulo (a mod b) = c is not implemented in B4A. This function is easily giving this rest value but is done as a function:
B4X:
' calculates (A mod B) and giving the rest
Sub Modulo(intA As Int, intB As Int) As Int
If intB = 0 then return
'
Return intA - Floor(intA / intB) * intB
'
End Sub