The compiler provides a built-in function, which is evaluated at compile time, to determine the length of an array (e.g. len (a)).
编译器提供了内建的功能在编译时求得一个数组的长度(如len (a))。
The compiler doesn't know what type V really represents, so it cannot instantiate an array of V.
编译器不知道V到底表示什么类型,因此不能实例化V数组。
Listing 2. Faking out the compiler with a final reference to a one-element array.
清单2.使用对一元素数组的最终引用欺骗编译器。
For-each loop: When iterating over an array, the compiler generates an induction variable and the standard array iteration idiom.
for - each循环:当迭代数组时,编译器生成归纳变量和标准的数组迭代语法。
The parentheses are effectively a request to the compiler to value-initialize the array, which in this case sets its elements to 0.
圆括号要求编译器对数组做值初始化,在本例中即把数组元素都设置为0。
Other useful changes include unsigned types, form default instances, compiler warnings, and explicit array bounds.
其他有用的变化包括了无符号类型、窗体默认实例、编译器警告,以及显式的数组范围。
Since the compiler can't prevent you from defeating type safety in this way, it instead prevents you from creating any array of generic type.
因为编译器不能从这个方式阻止你破坏类型安全,它只能阻止你创建任何的参数化类型类型数组。
If the parameter is a reference to the array, then the compiler does not convert an array argument into a pointer. Instead, a reference to the array itself is passed.
如果形参是数组的引用,编译器不会将数组实参转化为指针,而是传递数组的引用本身。
If the parameter is a reference to the array, then the compiler does not convert an array argument into a pointer. Instead, a reference to the array itself is passed.
如果形参是数组的引用,编译器不会将数组实参转化为指针,而是传递数组的引用本身。
应用推荐