官术网_书友最值得收藏!

Type aliases

Type aliases define an alternative name for an existing type. We define type aliases with the typealias keyword. Type aliases are useful when we want to refer to an existing type by a name that is contextually more appropriate, such as when working with data of a specific size from an external source. For instance, in the following example, we provide an alias for an unsigned 32-bit integer that can be used later in our code:

typealias UnsignedInteger = UInt32 

The typealias definitions can be used to simplify the closure and function definitions as well.

主站蜘蛛池模板: 翁源县| 青浦区| 浦东新区| 封丘县| 宜君县| 康平县| 共和县| 姜堰市| 原平市| 昌乐县| 济南市| 南部县| 凭祥市| 平顺县| 温州市| 松滋市| 班戈县| 丘北县| 曲松县| 民勤县| 浠水县| 衡阳县| 利川市| 修武县| 应用必备| 上杭县| 老河口市| 蕲春县| 南康市| 巴彦淖尔市| 宁河县| 徐州市| 霞浦县| 神木县| 怀化市| 潞城市| 阳高县| 贵州省| 永顺县| 屯留县| 盐山县|