但是您可能在想,语句块是什么意思呢。
有两个主要的if语句块。
for 循环,它对一个语句块执行一定次数。
The for loop, which executes a block of statements a certain number of times
语句块由冒号分隔的代码行组成。
Statement blocks are made up of lines of code delimited by colons.
loop语句不限次数地执行一个语句块。
The LOOP statement executes a statement block for an unspecified number of iterations.
语句块由一个或多个简单语句和复合语句组成。
The block of statements is made up of one or more simple and compound statements.
实例初始化语句块只有在它建立后才会被执行。
Instance initializer (s) gets executed ONLY IF the objects are constructed.
if语句,它基于测试表达式的结果执行一个特定的语句块。
The if statement, which executes a particular block of statements based on the result of a test expression.
查询编译器将视图定义展开成主语句块,从而产生一个更复杂的语句。
The query compiler expands view definitions into the main statement block, which might result in a more complex statement.
while循环,它当一个测试表达式为true时执行一个语句块。
The while loop, which executes a block of statements as long as a test expression is true.
为了处理长函数,我们通过垂直省略,缺省隐藏较大的语句块。
To handle long functions, we collapse large blocks by default, using vertical elision.
图的弧边表示从一个语句(或块)到另一个语句或语句块的控制流。
Edges in the graph represent flow of control from one statement (or block) to another.
例如,begin语句块会被首先执行,但它可以在程序中多次说明。
BEGIN blocks, for instance, will be executed first but can be specified many times throughout the program.
一个复合语句包括一个流控制指令,后跟一个冒号(:),然后再是一个程序语句块。
A compound statement consists of a flow control instruction, followed by a colon character (:), followed by a block of program statements.
WCF客户端不能用在Using语句块中,因为它可能会抛出不可预知的异常。
WCF Clients cannot be used inside a Using block because they may unexpectedly throw an exception.
每个具有自动存储类(3.7.2)对象的实例都与其所在语句块的相应入口相联系。
An instance of each object with automatic storage duration (3.7.2) is associated with each entry into its block.
然后根据程序中模块的特征选择与每个语句块相关的测试用例来计算该语句块的怀疑率。
Then, we selected related test case for each block based on the characteristic of program module, and computed suspiciousness of every block.
第一组闭合括弧划定一个匿名内部类的构造,第二组划定匿名内部类的实例初始化语句块。
The first set of enclosing braces delineates the construction of an anonymous inner class, and the second set delineates the instance initializer for the anonymous inner class.
if语句支持一个可选的else子句,指示当布尔表达式计算为False时应该处理的程序语句块。
The if statement supports an optional else clause that indicates a block of program statements that should be processed if the Boolean expression evaluates False.
通常情况下,这些方法中的代码都有一个大型的if -else语句块或者一个map查找。
Typically, these methods are written as one large if-else block or a Map lookup.
至此,已经看到了if语句可以如何用于根据一个特定布尔表达式的值,来执行两个程序语句块中的其中一个。
Up to this point, you've seen how the if statement can be used to execute one of two blocks of program statements, depending on the value of a particular Boolean expression.
Python中的第二种流控制语句是while循环,它在一个表达式计算为True时执行一个程序语句块。
The second type of flow control statement in Python is the while loop, which executes a block of program statements while an expression evaluates True.
本文简单介绍了该脚本的语法和基本编程技术,包括脚本支持的数据类型,流程控制和并行语句块的使用。
This paper briefly introduced its grammar and basic programming technology, including data types supported by the scripts, flow control and the use of parallel blocks.
和大多数语言一样,Scala的if测试一个条件表达式,然后根据结果为真或假来跳转到响应语句块中。
As in most every language, Scala's if evaluates a conditional expression, then proceeds to a block if the result is true or branches to an alternate block if the result is false. A simple example.
在Finally语句块中可以调用该方法,而不是调用Close,它封装了Close/Abort逻辑。
This method, called from a Finally block instead of Close, would encapsulate the Close/Abort logic.
GO TO标签语句可以无条件地退出循环,并将控制权转移到跟在指定的语句标签之后的可执行语句或语句块。
The GOTO label statement can unconditionally exit from a loop and transfer control to the executable statement or statement block that follows the specified statement label.
分隔符逐一进行分隔的语句块,则编辑器将使用相应语言的缩进规则,将该块视为一个语句块来设置它的格式。
Delimiters, the editor will format the block as if it were one block using the indentation rules of the appropriate language.
return关键字在这里是可选的,而且很少被用到,除非在一段代码中间返回(比如在一个if语句块中)。
The return keyword is optional here and it is rarely used, except when returning out of the middle of a block (e.g., in an if statement).
return关键字在这里是可选的,而且很少被用到,除非在一段代码中间返回(比如在一个if语句块中)。
The return keyword is optional here and it is rarely used, except when returning out of the middle of a block (e.g., in an if statement).
应用推荐