Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配列の添字記述方法 #2

Open
taisukef opened this issue Dec 14, 2024 · 2 comments
Open

配列の添字記述方法 #2

taisukef opened this issue Dec 14, 2024 · 2 comments

Comments

@taisukef
Copy link
Member

DNCLはBASIC風

point[3, 2]

現代のプログラミング言語の主流

point[3][2]

どちらがいいか?

@taisukef
Copy link
Member Author

配列の表記方法は [ ] か { } か、どちらがいいか?

DNCL, C言語など

Tokuten = { 87, 45, 72, 100 }

DNCL2, Python, JavaScriptなど

Tokuten = [87, 45, 72, 100]

@taisukef
Copy link
Member Author

{ } を使うと、ブロックと区別がつかないので、[ ] が良さそう
配列の[ ] とは、先頭に名前がつくかどうかで区別できる

taisukef added a commit that referenced this issue Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant