mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
GDScript basics: improve match explanation
Co-authored-by: Jacob Gray <jacopo.grayscale@gmail.com>
This commit is contained in:
@@ -862,8 +862,8 @@ Basic syntax::
|
|||||||
**Control flow**:
|
**Control flow**:
|
||||||
|
|
||||||
The patterns are matched from top to bottom.
|
The patterns are matched from top to bottom.
|
||||||
If a pattern matches, the corresponding block will be executed. After that, the execution continues below the ``match`` statement.
|
If a pattern matches, the first corresponding block will be executed. After that, the execution continues below the ``match`` statement.
|
||||||
If you want to have a fallthrough, you can use ``continue`` to stop execution in the current block and check the ones below it.
|
If you want to have a fallthrough, you can use ``continue`` to stop execution in the current block and check for an additional match in the patterns below it.
|
||||||
|
|
||||||
There are 6 pattern types:
|
There are 6 pattern types:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user