|
10.
|
|
|
While Statement
|
|
|
|
Оператор Пока
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/conditional.rst:58
|
|
11.
|
|
|
The while statement executes a block of code while an expression evaluates true. For example::
|
|
|
|
Оператор while выполняет блок кода, пока какое-либо выражение является истинным. Например::
|
|
Translated and reviewed by
theadmin
|
|
|
|
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.
|
|
|
|
Выражение вычисляется при первом просмотре оператора while, а затем снова, когда управление достигнет конца блока. Когда выражение станет ложным, оператор, находящийся после оператора while, будет выполнен.
|
|
Translated and reviewed by
theadmin
|
|
|
|
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 не содержит операторов "continue", "break" или "for". Операторы continue и break заменимы прыжками к меткам находящимся, соответственно, до или после цикла. Первый пример цикла while (см. выше) показывает, как заменить оператор for.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/conditional.rst:84
|
|
14.
|
|
|
Pass Statement
|
|
|
|
Оператор pass
|
|
Translated and reviewed by
theadmin
|
|
|
|
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.
|
|
|
|
Оператор pass можно использовать, когда необходим блок, но нет оператора, который необходимо выполнить в этом блоке. Он ничего не делает.
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/conditional.rst:95
|
|
16.
|
|
|
For example::
|
|
|
|
Например::
|
|
Translated and reviewed by
theadmin
|
|
|
|
Located in
../../source/conditional.rst:98
|