Hi all.
Let's say the sub A called the function B. And the sub D called the function B.
Is it possible in function B to find out what sub called this function?
Let's say the sub A called the function B. And the sub D called the function B.
Is it possible in function B to find out what sub called this function?
B4X:
Private sub A
dim str as String
str=B()
End Sub
Private sub D
dim str as String
str=B()
End Sub
Private sub B as String
dim caller as String
caller=..... ' How to get this info?
if caller="sub A" then
return "Hello A"
else
return "Hello B"
end if
End Sub