Sometimes you want to check the condition at the end and not the beginning.
do {
do_work();
} while condition
These substitutes are less than ideal:
do_work();
while condition {
do_work();
}
loop {
do_work();
if !condition { break }
}
A do while loop would be nice in these cases.
Sometimes you want to check the condition at the end and not the beginning.
These substitutes are less than ideal:
A
do whileloop would be nice in these cases.