guides:programstyle:goto
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
guides:programstyle:goto [2020/08/04 15:11] – wikiadmin | guides:programstyle:goto [2024/07/25 15:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 8: | Line 8: | ||
* Do not use goto statements | * Do not use goto statements | ||
* Only use break statements in switch statements | * Only use break statements in switch statements | ||
- | * Only use a single return statement per function, it must be the last statement in the function. | + | * Only use a single return statement per function. It must be the last statement in the function. |
* All functions should have a return statement. | * All functions should have a return statement. | ||
===== goto ===== | ===== goto ===== | ||
- | The use of a goto statement transfers code to a predefined location in the program. | + | The use of a goto statement transfers code to a predefined location in the program. |
===== continue ===== | ===== continue ===== | ||
guides/programstyle/goto.1596553881.txt.gz · Last modified: 2024/07/25 15:01 (external edit)