版本1和2间的区别
于2007-07-19 01:49:55修订的的版本1
大小: 1472
编辑: czk
备注:
于2008-02-23 15:37:07修订的的版本2
大小: 1472
编辑: localhost
备注: converted to 1.6 markup
未发现区别!

A.9.6 Jump statements

Jump statements transfer control unconditionally.

  • jump-statement:
    • goto identifier; continue; break; return expressionopt;

In the goto statement, the identifier must be a label (Par.A.9.1) located in the current function. Control transfers to the labeled statement.

A continue statement may appear only within an iteration statement. It causes control to pass to the loop-continuation portion of the smallest enclosing such statement. More precisely, within each of the statements

  • while (...) { do { for (...) {
    • .. ... ...
    contin: ; contin: ; contin: ; } } while (...); }

a continue not contained in a smaller iteration statement is the same as goto contin.

A break statement may appear only in an iteration statement or a switch statement, and terminates execution of the smallest enclosing such statement; control passes to the statement following the terminated statement.

A function returns to its caller by the return statement. When return is followed by an expression, the value is returned to the caller of the function. The expression is converted, as by assignment, to the type returned by the function in which it appears.

Flowing off the end of a function is equivalent to a return with no expression. In either case, the returned value is undefined.

TCPL/A.09.6_Jump_statements (2008-02-23 15:37:07由localhost编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.