I have a function func
which returns true
or false
. Until func
returns false
, I want to keep calling it. What is the least awkward way to do this?
do {
// do nothing
} while (func());
or..
while (func());
or..
while (func())
if (!func())
break;
All of them look really awkward and unintuitive to me. Is there another solution to this altogether?