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

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.

主站蜘蛛池模板: 昂仁县| 句容市| 沐川县| 建湖县| 绥芬河市| 涿州市| 西林县| 锦州市| 广河县| 新巴尔虎右旗| 石林| 盐边县| 临西县| 海林市| 武陟县| 平武县| 天气| 唐山市| 河南省| 大连市| 西丰县| 文成县| 长子县| 崇阳县| 长宁区| 长垣县| 寻甸| 大宁县| 金昌市| 阿荣旗| 深圳市| 五莲县| 古丈县| 大同市| 江川县| 罗甸县| 汉川市| 梁平县| 建阳市| 瑞昌市| 前郭尔|