adambard / adambard/learnxinyminutes-docs

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

Đang mở Phù hợp với người mới
#5,510 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Markdown
Star
12.3k
Fork
3.7k
Merge trung bình
13 giờ 10 phút
Pull request đã merge (30 ngày)
6

Mô tả

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])
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Open the repository's GDScript page and review the existing language-feature sections around match statements and strings. Add coverage for the two behaviors shown in the issue, keeping the examples and explanations consistent with the page; done means both features are documented clearly on that page.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
markdown
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
78/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.