`
talin2010
  • 浏览: 520723 次
  • 性别: Icon_minigender_1
  • 来自: 河北
社区版块
存档分类
最新评论

15.2 Blocks

 
阅读更多
A block permits multiple statements to be written in contexts where a single
statement is allowed.
block:
{ statement-listopt }
A block consists of an optional statement-list (§15.2.1), enclosed in
braces. If the statement list is omitted,
the block is said to be empty.
A block may contain declaration statements (§15.5). The scope of a local
variable or constant declared in a
block is the block.
Within a block, the meaning of a name used in an expression context must
always be the same (§14.5.2.1).
A block is executed as follows:
? If the block is empty, control is transferred to the end point of the
block.
? If the block is not empty, control is transferred to the statement list.
When and if control reaches the end
point of the statement list, control is transferred to the end point of the
block.
The statement list of a block is reachable if the block itself is reachable.
The end point of a block is reachable if the block is empty or if the end
point of the statement list is
reachable.
15.2.1 Statement lists
A statement list consists of one or more statements written in sequence.
Statement lists occur in blocks
(§15.2) and in switch-blocks (§15.7.2).
statement-list:
statement
statement-list statement
A statement list is executed by transferring control to the first
statement. When and if control reaches the end
point of a statement, control is transferred to the next statement. When
and if control reaches the end point of
the last statement, control is transferred to the end point of the
statement list.
A statement in a statement list is reachable if at least one of the
following is true:
? The statement is the first statement and the statement list itself is
reachable.
? The end point of the preceding statement is reachable.
? The statement is a labeled statement and the label is referenced by a
reachable goto statement.
The end point of a statement list is reachable if the end point of the last
statement in the list is reachable.
分享到:
评论

相关推荐

    Microsoft Codeview and Utilities User's Guide

    16.3.1 Description Blocks 16.3.2 Macros 16.3.3 Inference Rules 16.3.4 Directives 16.3.5 Pseudotargets 16.4 Response-File Generation 16.5 Differences between NMAKE and MAKE Chapter 17 Using Other ...

    Program in LUA 2nd Edition.rar

    15.2 The Basic Approach for Writing Modules 141 15.3 Using Environments 143 15.4 The module Function 144 15.5 Submodules and Packages 145 16 Object-Oriented Programming 149 16.1 Classes 151 16.2...

    Hbase中文文档

    15.2. IDEs 15.3. 创建 HBase 12-5-30 HBase 官方文档 3/81 abloz.com/hbase/book.htm 15.4. Publishing a new version of hbase.apache.org 15.5. 测试 15.6. Maven Build Commands 15.7. Getting Involved 15.8. ...

    MySql存储过程编程.chm

    Section 15.2. Executing Stored Programs with DBD::mysql Section 15.3. Conclusion Chapter 16. Using MySQL Stored Programs with Python Section 16.1. Installing the MySQLdb Extension Section ...

    程序语言设计原理习题解答

    15.2 Mathematical Functions 621 15.3 Fundamentals of Functional Programming Languages 623 15.4 The First Functional Programming Language: LISP 624 15.5 An Introduction to Scheme 628 15.6 ...

    OPENGL入门教材

    **15.2、顶点数组** 顶点数组是OpenGL中一种高效处理顶点数据的方法。 **15.3、顶点缓冲区对象** 顶点缓冲区对象(Vertex Buffer Object, VBO)是OpenGL中用于存储顶点数据的一种机制,它可以显著提高渲染性能。 #...

    SystemVerilog Reference Manual 3.1a(中英文版)+最新SV IEEE 标准

    Table of Contents Section 1 Introduction to SystemVerilog ...................................................................................................... 1 Section 2 Literal Values................

    SAP PO/PI教程 Process Orchestration The Comprehensive Guide

    4.1.1 Functional Blocks 4.1.2 First Steps in the Enterprise Services Repository 4.1.3 Service Interface 4.1.4 Integration Patterns: Stateful and Stateless Communication 4.1.5 Asynchronous versus ...

    Python Cookbook, 2nd Edition

    • Table of Contents • Index • Reviews • Reader Reviews • Errata • Academic Python Cookbook, 2nd Edition By David Ascher, Alex Martelli, Anna Ravenscroft Publisher : O'Reilly ...

    OpenGL入门学习.pdf

    1. **选择编译环境**:Windows平台下常用的编译器有Visual Studio、Code::Blocks等。其中,Visual Studio因其强大的调试工具和支持OpenGL的集成环境而受到许多开发者的青睐。 2. **安装OpenGL库**:尽管现代IDE通常...

    Practical Mod Perl

    CHECK and INIT Blocks Section 6.6. Apache::Registry Specifics Section 6.7. Transition from mod_cgi Scripts to Apache Handlers Section 6.8. Loading and Reloading Modules Section ...

    python3.6.5参考手册 chm

    Common Stumbling Blocks Print Is A Function Views And Iterators Instead Of Lists Ordering Comparisons Integers Text Vs. Data Instead Of Unicode Vs. 8-bit Overview Of Syntax Changes New Syntax ...

    Debugging with GDB --2007年

    Table of Contents Summary of GDB . . . . . . . . ....Free software ....Contributors to GDB ....A Sample GDB Session ....Loading the Executable ....Setting Display width....Setting Breakpoints ....Running the executable ...

    Error Correction coding——mathematical methods and algorithms

    Error Correction Coding - Mathematical Methods and Algorithms (Source Files Contained).pdf Error Correction Coding Mathematical Methods and Algorithms Todd K....Utah State University ...

    MC9S12XS128英文原版

    1.1 Introduction . . . . . . . . . ....1.1.1 Features ....1.1.2 Modes of Operation ....1.1.3 Block Diagram ....1.1.4 Device Memory Map ....1.1.5 Address Mapping ....1.1.6 Detailed Register Map ....1.1.7 Part ID ...

Global site tag (gtag.js) - Google Analytics