Swift-布尔vs布尔 [英] Swift - Bool vs Boolean

查看:98
本文介绍了Swift-布尔vs布尔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在自学使用Swift 3进行编程,目前我正在学习布尔值.我注意到,如果要显式声明bool类型的变量,则有两个选择

I am teaching myself to program using Swift 3, and I am currently learning about booleans. I noticed that if I want to explicitly declare my variable of type bool, I have two options

布尔

布尔值

我想知道为什么如果这两个选项相同,我们是否有这两个选项?好吧,他们是一样的吗?这就是我的困惑.

I was wondering why we have these two options if they are the same? Well, are they the same? This is what I'm confused about.

谢谢.

推荐答案

Bool是Swift的布尔数据类型.自Swift成立以来,Boolean就不存在了.

Bool is Swift's boolean data type. Boolean hasn't existed since the early days of Swift.

这篇关于Swift-布尔vs布尔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆