/* associated value(关联值): 重点+难点 * 引言: 声明阶段枚举关联某个类型, case的rawValue确定了, case的绑定值是一个常量, 不可以改变; 无法满足下面的需...
基于36个网页-相关网页
One column holds the name and the other column of the same row shows the associated value.
其中一个列显示名称,同一行中的另一个列则显示相关的值。
In the body aspect of my put call, note how each name has an associated value, almost like a normal map.
在put调用的body部分,注意为各名称指定相关值的方式,几乎与普通的映射无异。
For example, the value in slot 0 of the first array has a corresponding associated value in slot 0 of the second array.
例如,第一个数组的位置0的值与第二个数组的位置0的值相关联。
So it doesn't matter how big the dictionary is, you can instantaneously retrieve the value associated with the key. Extremely powerful.
因为你可以在线性时间,内得到想要的键对应的值,这太强大了。
This is saying, that's a class, true or sorry, an instance of a class, and I'm going to get the x value associated with it.
那么两个点是同一个点,我会返回,注意格式,这儿的意思是,它是一个类,噢对不起。
Second thing we saw was, we saw that associated with every primitive value was a type.
我们学习到的第二件事情是,和每个基本值对应的,是一个类型。
应用推荐