When I have a Sub with a standard type as parameter:
I can pass values either, (1) using a variable or (2) directly, as follows:
When using a Sub with a custom type as a parameter:
How do I pass values to the sub directly, without using a variable? Is something like this possible:
B4X:
Sub Temp(Input As Int)
Dim x As Int
x = Input
End Sub
B4X:
Dim y As Int = 3
Temp(y)
--OR--
Temp(3)
When using a Sub with a custom type as a parameter:
B4X:
Type Coordinates (x As Int, y As Int)
Sub Temp(Input As Coordinates)
Dim x, y As Int
x = Input.x
y = Input.y
End Sub
B4X:
Temp((3, 4))