But you might wonder what is meant by block of statements.
但是您可能在想,语句块是什么意思呢。
The for loop, which executes a block of statements a certain number of times
for 循环,它对一个语句块执行一定次数。
The block of statements is made up of one or more simple and compound statements.
语句块由一个或多个简单语句和复合语句组成。
The while loop, which executes a block of statements as long as a test expression is true.
while循环,它当一个测试表达式为true时执行一个语句块。
The if statement, which executes a particular block of statements based on the result of a test expression.
if语句,它基于测试表达式的结果执行一个特定的语句块。
Because Python requires indentation to offset the block of statements that should be executed if the expression evaluates True or False, the two print statements are both indented four Spaces.
因为Python需要缩进以错开当表达式计算为True或False时应该执行的语句块,所以两个print语句都缩进了4个空格。
It USES this information to ensure that it aligns only those assignment statements at the same scoping level in the same block of code.
它使用这些信息来确保只对位于同一代码块中相同范围级别的赋值语句执行对齐。
A compound statement consists of a flow control instruction, followed by a colon character (:), followed by a block of program statements.
一个复合语句包括一个流控制指令,后跟一个冒号(:),然后再是一个程序语句块。
The while loop, as was the case with the if statement, supports an optional else clause containing a block of program statements executed when the expression is False.
while循环与if语句一样,支持一个可选的else子句,其中包含一个当表达式计算为False时执行的程序语句块。
An example of this is finding return statements within a finally block.
其中的一个范例是找到finally块内的return声明。
In the defs, I've added a UFO formed from simple SVG arcs and circles, in order to avoid another huge block of path statements from the tablet.
在defs中,我添加了一个从简单的svg弧形和圆构成的u fo,以避免另外一大块来自写字板的path语句。
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子句,指示当布尔表达式计算为False时应该处理的程序语句块。
The compiler is allowed to move statements into a synchronized block — just not out of it.
编译器可以把语句移入synchronized块——而不仅仅是把语句移出。
I identified a block of code statements associated with a particular bibliographic: topic and added references to calendar sources.
确定了与一个特定的bibliographic:topic相关联的代码块,并且给日历源代码添加了引用。
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.
Python中的第二种流控制语句是while循环,它在一个表达式计算为True时执行一个程序语句块。
Looping statements in PHP are used to execute the same block of code a specified number of times.
PHP循环语句的作用是:对同一个代码块执行指定的次数。
While the language enables you to use simple, nonblock statements as the body of these constructs, you should always use a block statement in these situations.
尽管语言本身可以让你使用简单、非块状的语句作为这些结构的主体,但你还是应该经常使用块状语句。
While the language enables you to use simple, nonblock statements as the body of these constructs, you should always use a block statement in these situations.
尽管语言本身可以让你使用简单、非块状的语句作为这些结构的主体,但你还是应该经常使用块状语句。
应用推荐