Jump Statements
suggest changeSyntax
- return val; /* Returns from the current function. val can be a value of any type that is converts to the function’s return type. */
- return; /* Returns from the current void-function. */
- break; /* Unconditionally jumps beyond the end (“breaks out”) of an Iteration Statement (loop) or out of the innermost switch statement. */
- continue; /* Unconditionally jumps to the beginning of an Iteration Statement (loop). */
- goto LBL; /* Jumps to label LBL. */
- LBL: statement /* any statement in the same function. */
Remarks
These are the jumps that are integrated into C by means of keywords.
C also has another jump construct, long jump, that is specified with a data type, jmp_buf
, and C library calls, setjmp
and longjmp
.
See also
http://stackoverflow.com/documentation/c/5151/iteration-statements-loops-for-while-do-while#t=201608200831273762608
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents