One of the first codebases I ever worked on professionally allowed gotos as part of its style guide, but only under two conditions:
1. You're using the goto for error handling and cleanup in a function; and
2. You only jump in a forward direction.
1. You're using the goto for error handling and cleanup in a function; and
2. You only jump in a forward direction.
ON ERROR GOTO handler
[try code here]
GOTO finally
handler:
[catch code here]
finally:
[finally code here]