Because short is enough.
I. Short's range: -32768~+32767, 32767 / 365 = 89.77
II. 89.77 years is long enough for most people.
III. If some one is overflow, there is unsigned short for him ... (0~65535, 179.54 years)
IV. Why day, not hour ? Because we live day by day.
子在川上曰:「逝者如斯夫,不舍昼夜。」
所以在他看来,大概 Life is float.
lift is short是因为取值范围够用:short 最大值是32767(年)多,99.9%的生命不可能溢出。
PS:说这话的一定是嵌入式软件工程师,int 占用4个byte,double占用8个byte空间,而short只占用2个byte空间。
life is short是个表达式,这个表达式的值可能是true也可能是false。
Assert.IsTrue( life is short )
才是断言。
本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度,google,bing,sogou 等
© 2025 tinynews.org All Rights Reserved. 百科问答小站 版权所有