|
1.
|
|
|
Labels & Control Flow
|
|
|
|
Labels & Control Flow
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/label.rst:5
|
|
2.
|
|
|
Label Statement
|
|
|
|
Label Statement
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
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 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. ::
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
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.
|
|
|
|
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.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
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:
|
|
|
|
The label statement may take an optional list of parameters. These parameters are processed as described in PEP 3102, with two exceptions:
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/label.rst:25
|
|
6.
|
|
|
The values of default parameters are evaluated at call time.
|
|
|
|
The values of default parameters are evaluated at call time.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/label.rst:28
|
|
7.
|
|
|
The variables are dynamically, rather than lexically, scoped.
|
|
|
|
The variables are dynamically, rather than lexically, scoped.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/label.rst:29
|
|
8.
|
|
|
Jump Statement
|
|
|
|
Jump Statement
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/label.rst:34
|
|
9.
|
|
|
The jump statement is used to transfer control to the given label.
|
|
|
|
The jump statement is used to transfer control to the given label.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
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.
|
|
|
|
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.
|
|
Translated and reviewed by
Stephan Woidowski
|
|
|
|
Located in
../../source/label.rst:38
|