B4J Question Determine "Argument" type in a subroutine

is skeleton structure correct?

Sub MySub (v as Object) As String

If v Is Long Then
... process long ...
Return Somthing
End if

If v Is Double Then
... process double ...
Return SomthingElse
End if

Return NotCorrect

End Sub

That is, can I pass "anything" and check to see if the data type is something like long, or double, or string for instance

Charlie
 
Solution
Please use [code]code here...[/code] tags when posting code.

Yes, but I wouldn't do it with numeric types. The reason is that the compiler can cast the types quite flexibly.
In this case it is better to be explicit:
B4X:
Sub MySubLong (l As Long) As String

...

Sub MySubDouble (d As Double) As String
Top