|
8.
|
|
|
The expressions in the if statement are evaluated in order, from first to last. When an expression evaluates to true, the block corresponding to that statement is executed. When control reaches the end of the block, it proceeds to the statement following the if statement.
|
|
|
|
The expressions in the if statement are evaluated in order, from first to last. When an expression evaluates to true, the block corresponding to that statement is executed. When control reaches the end of the block, it proceeds to the statement following the if statement.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:45
|
|
9.
|
|
|
If all expressions evaluate to false, the block associated with the ``else`` clause is executed, if the ``else`` clause is present.
|
|
|
|
If all expressions evaluate to false, the block associated with the ``else`` clause is executed, if the ``else`` clause is present.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:51
|
|
10.
|
|
|
While Statement
|
|
|
|
While Statement
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:58
|
|
11.
|
|
|
The while statement executes a block of code while an expression evaluates true. For example::
|
|
|
|
The while statement executes a block of code while an expression evaluates true. For example::
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:60
|
|
12.
|
|
|
The expression is evaluated when while statement is first reached, and then each time control reaches the end of the block. When the expression return a false value, the statement after the while statement is executed.
|
|
|
|
The expression is evaluated when while statement is first reached, and then each time control reaches the end of the block. When the expression return a false value, the statement after the while statement is executed.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:80
|
|
13.
|
|
|
Ren'Py does not have continue, break, or for statements. Continue and break statements can be replaced by jumps to labels placed before or after the while loop, respectively. The first example of a while loop, above, shows how a while loop can replace a for statement.
|
|
|
|
Ren'Py does not have continue, break, or for statements. Continue and break statements can be replaced by jumps to labels placed before or after the while loop, respectively. The first example of a while loop, above, shows how a while loop can replace a for statement.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:84
|
|
14.
|
|
|
Pass Statement
|
|
|
|
Pass Statement
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:93
|
|
15.
|
|
|
The pass statement can be used when a block is required, but no statement is suitable. It does nothing.
|
|
|
|
The pass statement can be used when a block is required, but no statement is suitable. It does nothing.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:95
|
|
16.
|
|
|
For example::
|
|
|
|
For example::
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/conditional.rst:98
|