One of the new features of version 6.90 is: "Subs parameters can be passed by reference (ByRef). This can be used to return several values from a sub"
I cannot find any documentation about returning multiple values. the only reference I found is: http://www.b4x.com/forum/questions-help-needed/5273-sub-value-return.html that does not helping much.
For example, this sub returns the two square roots of a number:
B4X:
Sub App_Start
Dim pos, neg As Number
MySqrt(16, pos, neg)
Msgbox(pos)
Msgbox(neg)
End Sub
Sub MySqrt(value As Number, ByRef positive As Number, ByRef negative As Number)
positive = Sqrt(value)
negative = -positive
End Sub