I often have the situation, that I want to change variables var1 to var2 .
But in a function, I cannot change the input parameters. How could i do it with a "function-call" The variables are sometimes strings, integers oder objects from Android Studio GUI
I do it like this:
tmp = var1
var1 = var2
var2 = tmp
or
tmp = name1.text.toStirng()
name1.text.toString() = name2.text.toString()
name2.text.toString() = tmp
as a function I think it is not possible
fun switch_vars(var1:String, var2:String)
it does not work.
How can is do it, because i have plenty of such situations