What & How & Why

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版两侧同时换到之后的修订记录
cs:fundamental:cs61a:week_1 [2023/09/26 04:20] – [Control] codingharecs:fundamental:cs61a:week_1 [2023/09/26 04:26] – [Compound Statements] codinghare
行 261: 行 261:
 </code> </code>
 ==Compound Statements== ==Compound Statements==
 +结构如下:
 +<code py>
 +<header>:
 +    <statement>
 +    <statement>
 +    ...
 +<separating header>:
 +    <statement>
 +    <statement>
 +    ...
 +...
 +</code>
 +<WRAP center round box 100%>
 +根据上述定义,''def'' 属于 //compound statement//
 +</WRAP>
 +上述的结构可以被视作 //sequence//,也就是该结构总可以分为两个部分:
 +  * 当前的 statement
 +  * 余下的 statement
 +这是一种递归的结构。
 +===Local Assignment===