|
2.
|
|
|
Label Statement
|
|
|
|
Оператор label (метка)
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:8
|
|
3.
|
|
|
Label statements allow the given name to be assigned to a program point. They exist solely to be called or jumped to, whether by script code or the Ren'Py config. ::
|
|
|
|
Операторы label позволяют присвоить точке программы имя. Они существуют исключительно для вызова и перехода, не важно из скрипта кода или из конфигурационного файла Ren'Py.
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:10
|
|
4.
|
|
|
A label statement may have a block associated with it. In that case, control enters the block whenever the label statement is reached, and proceeds with the statement after the label statement whenever the end of the block is reached.
|
|
|
|
Оператор label может иметь связанный с ним блок. В этом случае элемент управления входит в блок всякий раз, когда достигается оператор label, и переходит с оператором после оператора label всякий раз, когда достигается конец блока.
|
|
Translated and reviewed by
Dmitriy Kiryanov
|
|
|
|
Located in
../../source/label.rst:21
|
|
5.
|
|
|
The label statement may take an optional list of parameters. These parameters are processed as described in PEP 3102, with two exceptions:
|
|
|
|
Оператор label может принимать список необязательных параметров. Эти параметры обрабатывают как описано в PEP 3102, с двумя исключениями:
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:25
|
|
6.
|
|
|
The values of default parameters are evaluated at call time.
|
|
|
|
Значения параметров по умолчанию устанавливаются во время вызова.
|
|
Translated and reviewed by
Andrew Bida
|
|
|
|
Located in
../../source/label.rst:28
|
|
7.
|
|
|
The variables are dynamically, rather than lexically, scoped.
|
|
|
|
Переменные относятся скорее к динамической, нежели статической области видимости.
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:29
|
|
8.
|
|
|
Jump Statement
|
|
|
|
Оператор jump (переход)
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:34
|
|
9.
|
|
|
The jump statement is used to transfer control to the given label.
|
|
|
|
Оператор jump используется для передачи управления заданной метке.
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:36
|
|
10.
|
|
|
If the ``expression`` keyword is present, the expression following it is evaluated, and the string so computed is used as the label name of the statement to jump to. If the ``expression`` keyword is not present, the label name of the statement to jump to must be explicitly given.
|
|
|
|
Если присутствует ключевое слово ``expression``, следующее за ним выражение вычисляется и полученная строка используется как имя метки для перехода. Если ключевое слово ``expression``отсутствует, имя метки в операторе перехода должно быть задано явно.
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:38
|
|
11.
|
|
|
Unlike call, jump does not push the next statement onto a stack. As a result, there's no way to return to where you've jumped from. ::
|
|
|
|
В отличии от вызова, переход не добавляет следующий оператор в стек. В результате, нет никакого способа вернуться туда, откуда переходили.
|
|
Translated and reviewed by
акаса
|
|
|
|
Located in
../../source/label.rst:43
|