块 (编程)
引用

↑  Perlis, A. J.; Samelson, K.  (PDF). Communications of the ACM (New York, NY, USA: ACM). 1958, 1 (12): 8–22  [2023-02-20]. doi:10.1145/377924.594925. （原始内容存档 (PDF)于2023-02-20）. Strings of one or more statements may be combined into a single (compound) statement by enclosing them within the "statement parentheses" begin and end. Single statements are separated by the statement separator ";".
↑  John Backus; Friedrich L. Bauer; J. Green; C. Katz; John McCarthy; Alan Jay Perlis; Heinz Rutishauser; K. Samelson; B. Vauquois; J. H. Wegstein; A. van Wijngaarden; M. Woodger. Peter Naur , 编.  (PDF) 3 (5). New York, NY, USA: ACM: 299–314. May 1960  [2009-10-27]. ISSN 0001-0782. doi:10.1145/367236.367262. （原始内容存档 (PDF)于2022-12-13）. Sequences of statements may be combined into compound statements by insertion of statement brackets. ……
Each declaration is attached to and valid for one compound statement. A compound statement which includes declarations is called a block.
↑  J. W. Backus, F. L. Bauer, J. Green, C. Katz, J. McCarthy, P. Naur, A. J. Perlis, H. Rutishauser, K. Samelson, B. Vauquois, J. H. Wegstein, A. van Wijngaarden, M. Woodger. Peter Naur , 编. . Communications of the ACM, Volume 6, Number 1, pages 1-17. January 1963  [2023-02-20]. （原始内容存档于2023-02-20）. A sequence of statements may be enclosed between the statement brackets begin and end to form a compound statement. ……
A sequence of declarations followed by a sequence of statements and enclosed between begin and end constitutes a block. Every declaration appears in a block in this way and is valid only for that block.
↑  J. W. Backus, F. L. Bauer, J. Green, C. Katz, J. McCarthy, P. Naur, A. J. Perlis, H. Rutishauser, K. Samelson, B. Vauquois, J. H. Wegstein, A. van Wijngaarden, M. Woodger. Peter Naur , 编. . Communications of the ACM, Volume 6, Number 1, pages 1-17. January 1963  [2023-02-20]. （原始内容存档于2023-02-20）. Since labels are inherently local, no go to statement can lead from outside into a block. A go to statement may, however, lead from outside into a compound statement.
↑  A. van Wijngaarden, B. J. Mailloux, J. E. L. Peck, C. H. A. Koster, M. Sintzoff, C. H. Lindsey, L. G. L.T. Meertens and R. G. Fisker. . IFIP W.G. 2.1.   [2023-02-20]. （原始内容存档于2020-07-11）. The ALGOL 60 concepts of block, compound statement and parenthesized expression are unified in ALGOL 68 into the serial-clause. A serial-clause may be an expression and yield a value. ……
A serial-clause consists of a possibly empty sequence of unlabelled phrases, the last of which, if any, is a declaration, followed by a sequence of possibly labelled units. The phrases and the units are separated by go-on-tokens, viz., semicolons. Some of the units may instead be separated by completers, viz., EXITs; after a completer, the next unit must be labelled so that it can be reached. The value of the final unit, or of a unit preceding an EXIT, determines the value of the serial-clause.
1 2  Kathleen Jensen, Niklaus Wirth.  (PDF). 1991  [2023-02-20]. （原始内容存档 (PDF)于2023-02-20）. The program is divided into a heading and a body, called a block. The heading gives the program a name and lists its parameters. …… The block consists of six sections, where any except the last may be empty. They must appear in the order given in the definition for a block:
Block =
    LabeLDeclarationPart
    ConstantDefinitionPart
    TypeDefinitionPart
    VariableDeclarationPart
    ProcedureAndFunctionDeclarationPart
    StatementPart.
……
Each procedure and function declaration has a structure similar to a program; i.e. , each consists of a heading and a block. ……
The compound statement is that of Algol, and corresponds to the DO group in PL/I. ……
The "block structure" differs from that of Algol and PL/I insofar as there are no anonymous blocks; i.e., each block is given a name and thereby is made into a procedure or function.
↑  Kathleen Jensen, Niklaus Wirth.  (PDF). 1991  [2023-02-20]. （原始内容存档 (PDF)于2023-02-20）. The compound statement specifies that its component statements be executed in the same sequence as they are written. The symbols begin and end act as statement brackets. ……
Pascal uses the semicolon to separate statements, not to terminate statements; i.e., the semicolon is not part of the statement.
1 2  
Brian Kernighan, Dennis Ritchie.  (PDF). Prentice Hall. 1988. 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; ……) There is no semicolon after the right brace that ends a block. ……
A label has the same form as a variable name, and is followed by a colon. It can be attached to any statement in the same function as the goto. The scope of a label is the entire function. ……
C is not a block-structured language in the sense of Pascal or similar languages, because functions may not be defined within other functions. On the other hand, variables can be defined in a block-structured fashion within a function. Declarations of variables (including initializations) may follow the left brace that introduces any compound statement, not just the one that begins a function. Variables declared in this way hide any identically named variables in outer blocks, and remain in existence until the matching right brace. ……
An automatic variable declared and initialized in a block is initialized each time the block is entered.
Automatic variables, including formal parameters, also hide external variables and functions of the same name.
↑  
John McCarthy, Paul W. Abrahams, Daniel J. Edwards, Timothy P. Hart, Michael I. Levin.  (PDF) 2nd. MIT Press. 1985 [1962]  [2021-09-23]. ISBN 0-262-13011-4. （原始内容 (PDF)存档于2021-03-02）. The LISP 1.5 program feature allows the user to write an Algol-like program containing LISP statements to be executed. ……
The program form has the structure - (PROG, list of program variables, sequence of statements and atomic symbols...) An atomic symbol in the list is the location marker for the statement that follows.
↑  
Kent M. Pitman（英语：）. . 1983, 2007  [2021-10-14]. （原始内容存档于2021-12-21）. LET is used to bind some variables to some objects, and then to evaluate some forms (those which make up the body) in the context of those bindings. ……
LET* Same as LET but does bindings in sequence instead of in parallel.  请检查|date=中的日期值 (帮助)
|  论 编编程范型 |
| --- | --- |
指令式:  过程式  结构化  非结构化  例外处理 
面向对象:  基于类  基于原型  契约式  面向代理 
函数式:  纯函数式  全函数式  隐式 函数级 
数据流程:  同步式  响应式 函数式响应  管道  串流处理  基于流程 
宣告式:  逻辑式 回答集  函数式逻辑  约束式  数据查询  框架本体 
元编程:    模板  反射式 同像性  元对象  元类  面向特性  面向语言 
/:  协程 生成器  future/promise  演员模型 消息传递  通信顺序进程 通道  分叉会合  整体同步  PGAS 
其他范型:  阵列  面向表达式（英语：）  模块化 关注分离  面向方面  数据驱动  事件驱动  串接式 面向堆栈  基于自动机  可微分  概率式 
 关键特征:  块 嵌套函数（英语：）  回调函数  递归  头等对象 头等函数  闭包  实化 续体  多态 运算符重载  泛型  多分派  模式匹配  推导式  抽象数据类型  代数数据类型  递归数据类型  求值策略  非确定性 
多范型语言比较（英语：）