You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ``%UniqueNode`` | Shorthand for ``get_node("%UniqueNode")`` |
@@ -1437,7 +1447,15 @@ match
1437
1447
A ``match`` statement is used to branch execution of a program.
1438
1448
It's the equivalent of the ``switch`` statement found in many other languages, but offers some additional features.
1439
1449
1440
-
Basic syntax::
1450
+
.. warning::
1451
+
1452
+
``match`` is more type strict than the ``==`` operator. For example ``1`` will **not** match ``1.0``. The only exception is ``String`` vs ``StringName`` matching:
1453
+
for example, the String ``"hello"`` is considered equal to the StringName ``&"hello"``.
1454
+
1455
+
Basic syntax
1456
+
""""""""""""
1457
+
1458
+
::
1441
1459
1442
1460
match <expression>:
1443
1461
<pattern(s)>:
@@ -1446,19 +1464,16 @@ Basic syntax::
1446
1464
<block>
1447
1465
<...>
1448
1466
1449
-
.. warning::
1450
-
1451
-
``match`` is more type strict than the ``==`` operator. For example ``1`` will **not** match ``1.0``. The only exception is ``String`` vs ``StringName`` matching:
1452
-
for example, the String ``"hello"`` is considered equal to the StringName ``&"hello"``.
1453
-
1454
-
**Crash-course for people who are familiar with switch statements**:
1467
+
Crash-course for people who are familiar with switch statements
0 commit comments