Qiita Conference 2025

鹿野壮 (@tonkotsuboy_com)

アウトプットは最強の自己投資 〜発信が人生とキャリアを変えた話〜

12
12

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.

Swift の true と TRUE は別物です。

Last updated at Posted at 2014-06-06

Swift の Bool は true or false

Swift で Bool 型として扱われるのは、 true or false だけです。

じゃあ TRUE とか FALSE ってなんなのなの?

互換用に定義されている、 Int 型を返すマクロです。

Sample

TRUE == 1 // true
TRUE == 0 // false
TRUE == -1 // false

FALSE == 0 // true
FALSE == 1 // false
FALSE == -1 // false

 

さよなら YES or NO
12
12
0

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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?