...中,一些预定义的数据类型之间存在着预定义的转换,可分为隐式转换(implicit conversions)和显式转换(explicit conversions),本节介绍隐式转换。 所谓隐式转换就是系统默认的,不需要程序员干预就可以自行转换的。
基于42个网页-相关网页
Standard Explicit Conversions 标准显式转换
User-Defined Explicit Conversions 户自定义显式转换
Defined Explicit Conversions 户自定义显式转换
explicit type conversions 显示类型转换
Explicit Numeric Conversions 显式数值转换 ; 数值转换
Explicit Enum Conversions 显式枚举转换
Either expand to an IfExpr to special-case the non-numbers or use number() to force explicit conversions and obtain NaN as under 1.0.
或者扩展 IfExpr 引入非数字的特殊情况,或者像 1.0 那样使用 number() 强制显式转换得到 NaN。
Generics are useful because they provide stronger compile-time type checking, require fewer explicit conversions between data types, and reduce the need for boxing operations and run-time type checks.
泛型相当有用,因为他们提供强制的编译时类型检查,要求更少的数据类型之间的显式转换,并减少装箱拆箱的操作和运行时类型检查。
Explicit conversion is required by some compilers to support narrowing conversions.
有些编译器需要显式转换来支持收缩转换。
应用推荐