intendo cosi:

if (fuori=="1") {
rientra();
}

else if (fuori=="0") {
esce();
}