Jump anywhere: Difference between revisions
Content added Content deleted
Tag: Undo |
Tag: Manual revert |
||
Line 2,933: | Line 2,933: | ||
2) 'Goto' only allowed unconditionally jumping to a label within the function it belongs to. |
2) 'Goto' only allowed unconditionally jumping to a label within the function it belongs to. |
||
3) Labelled 'break' and 'continue' statements are preferred alternatives to 'unsafe goto' usage. |
3) Labelled 'break' and 'continue' statements are among the preferred alternatives to 'unsafe goto' usage. |
||
4) Labelled 'break' and 'continue' allow easy breaking out of a nested loop or continuing within a loop. |
4) Labelled 'break' and 'continue' allow easy breaking out of a nested loop or continuing within a containing loop. |
||
<syntaxhighlight lang="vlang"> |
<syntaxhighlight lang="vlang"> |
||
// Unsafe 'goto' pseudo example: |
// Unsafe 'goto' pseudo example: |