7.2.7 BGOTO and LABEL

CSI(C&F) provides the abusable GOTO statement, and labels to branch to. Formally, the GOTO is never necessary, and in practice it is almost always easy to write code without it. Nevertheless, there might be a few situations where GOTO may find place. As there exists no early loop exiting in CSI(C&F), as, e.g., "break" in C and C++, we can use GOTO to leave inner loops without exiting the whole program with EXIT.

/* Do some computation */

FOR ...

FOR ...

...

IF (exception) THEN /* early loop exiting */

GOTO Error

ELSE

...

ENDIF

NEXT ...

NEXT ...

EXIT

LABEL Error

/* Clean up and exit */

...

EXIT

The use of GOTO can always be avoided, though perhaps at the price of additional code.