This question already has an answer here:
I have func1
and func2
functions. Each of them calls another common_func
function.
func func1(){
common_func()
}
func func2(){
common_func()
}
func common_func(){
}
Is it possible inside common_func
find out which function called it (without passing additional info in arguments to function like common_func(name_of_caller string)
)?
</div>