well if you look at the original case I'd do

While (reason)
if (something)
{
function1();
reason=0;
}
(which is quite usless) but I thought polymorphism was what he asked for