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

thenを省略する? #1

Open
taisukef opened this issue Dec 14, 2024 · 1 comment
Open

thenを省略する? #1

taisukef opened this issue Dec 14, 2024 · 1 comment

Comments

@taisukef
Copy link
Member

thenを使うもの

if 0 == 0 then print "0==0"

省略したもの

if 0 == 0 print "0==0"

どちらがいいか

@taisukef
Copy link
Member Author

if文は{ } 必須として、thenは省略するものとする

1行で書く場合

if 0 == 0 { print "0 == "0" }

複数行で分けて書く場合

if 0 == 0 {
  print "0" == "0"
}

#4

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