尽管默认情况下枚举被存储为整数,但您可以指定要使用的整型基类型。
While enumerations are stored as integers by default, you can specify the integral base type to use.
在这种情况下,虽然年龄实际上是一个有效的整数,但转换仍然会失败,因为该值不是短整型的。
In this case, while age is actually a valid integer, conversion still fails because the value is not a short integer.
浮点数和小数不象整数一样“循规蹈矩”,不能假定浮点计算一定产生整型或精确的结果,虽然它们的确“应该”那样做。
Floating point and decimal Numbers are not nearly as well-behaved as integers, and you cannot assume that floating point calculations that "should" have integer or exact results actually do.
应用推荐