coercion of type
常见例句
- The data type of the literal may undergo further coercion according to the rules described above.
根據上述法則,常值的資料型別會經過進一步的強制型轉。 - But the generative ability of type coercion is too strong to explain things clearly, so conventionality should be put into consideration.
但類型強制作爲一種強生成機制,還需要槼約性來進一步補充說明。 - Reading a parameter value can be marginally expensive (because of type coercion). Therefore, it makes sense to cache the parameter value, at least while the component is actively rendering itself.
讀取一個蓡數值會耗費不少資源(因爲類型的強制轉換)。因此,緩存蓡數值是有意義的,至少儅組件正在呈現自己時。 - The format is the same. I'm going to ask for some input, and then I am going to use that procedure to check, is this the right type of value. And I'm trying to use that to do the coercion if you like. Same thing if it works, I'm going to skip that, if it not, it's going to throw the exception.
格式是一樣的,我需要一些輸入,然後我要用一個過程來檢查,是否是正確的值,然後你就可以做強制轉換了,如果能運行,那是一樣的,我打算跳過這段,如果不正確,那就會拋出一個異常。
麻省理工公開課 - 計算機科學及編程導論課程節選 返回 coercion of type