Do ... while structure improvement

Sometimes the use of jumps such as: continue, break, goto, call to a function, etc. is necessary to avoid the execution of some instructions.

This is the case of the seed, warp and swap loops of this solution for the n queens problem.

To avoid the use of jumps or tricks like for(;;) if(condition)break; on some of these cases, we are suggesting the below improvement to the do ... while loop structure.



/* author: ncomputers.org */
int main(){
    // Allow initializers (extra improvement)
    do(bool condition=0){
        // Block A
    }while(condition){
        // Block B
        // Variables declared inside the initializer still visible
    }
    return 0;
}