Skip to content

Corrected continue label for consistency

Latest
Compare
Choose a tag to compare
@AlbertoGP AlbertoGP released this 21 Mar 16:08

The most important changes are much improved error messages and a correction to the way the continue label; works: this discussion in Reddit made me realize that it was misleading, as the jump went to outside the labeled loop, instead of going back to the loop condition which using goto is done by placing the label at the end of the block.

The new way is to put the label in front of the loop condition instead, which I find clearer than putting the label at the end of the loop. Cedro will then move the label to the end of the loop as required by the C compiler.

The old way, jumping with continue to a label right before a loop, still works for the case when you want to re-try the loop, although it is no longer shown in the examples.