版本1和2间的区别
于2006-06-18 20:08:14修订的的版本1
大小: 837
编辑: czk
备注:
于2007-07-18 19:36:39修订的的版本2
大小: 902
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 1: 行号 1:
## page was renamed from Control Flow/3.1 Statements and Blocks

Navigation(slides)

3.1 Statements and Blocks

An expression such as x = 0 or i++ or printf(...) becomes a statement when it is followed by a semicolon, as in

   x = 0;
   i++;
   printf(...);

In C, the semicolon is a statement terminator, rather than a separator as it is in languages like Pascal.

Braces { and } are used to group declarations and statements together into a compound statement, or block, so that they are syntactically equivalent to a single statement. The braces that surround the statements of a function are one obvious example; braces around multiple statements after an if, else, while, or for are another. (Variables can be declared inside any block; we will talk about this in Chapter 4.) There is no semicolon after the right brace that ends a block.

Navigation(siblings)

TCPL/3.1_Statements_and_Blocks (2008-02-23 15:34:59由localhost编辑)

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