adambard / adambard/learnxinyminutes-docs

[Godot] Add pattern matching and string interpolation to GDScript's page

Open
#5,510 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Markdown
Stars
12.3k
Forks
3.7k
Avg merge
13h 10m
Merged PRs (30d)
6

Description

GDScript supports pattern matching in match statements:

```gdscript
match character:
var p when character is Character: print("Friend!")
var p when character is Enemy: print("Enemy!")
var p when character is NPC: print("Hi, i guess")
_: print("Nothing relevant")
```

But the page doesn't explain that. Also there is typed string interpolation and doesn't is in the page as well:

```gdscript
for i in 100:
print("%d is even?: %s" % [i, i % 2])
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.