0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

The Basic - Comments, Semicolons

Last updated at Posted at 2017-02-09

参考

The Swift Programming Language 3.0.1

  • The Basic - Comments
  • The Basic - Semicolons

コメント

Swift ではコメントが2種類で書ける。

1行コメント

// を行頭に添えると、その行はコメントになる

// この行はコメント

複数行コメント

*/ で始め、*/ で終了を示唆。

/* コメント開始
コメント行
*/ // コメント終了

セミコロン

Swift では文の終了に ; を書かなくても良いが、
書いても良い。
逆に、; を添えると、1行に2つの文が書ける

let someConst = "sample"; let someConst2 = "aaa"

自分が使う言語では ; が不要なので、書かない方向で進める。

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?