The Zig Programming Language 0.12.0 Documentationboth the length, and the fact that they are null-terminated, and thus they can be coerced to both Slices and Null-Terminated Pointers. Dereferencing string literals converts them to Arrays. Because Zig expectError demo... OK All 2 tests passed. The Zig Standard Library also contains functions to compare Slices, strings, and more. See the rest of the std.testing namespace in the Zig Standard Library for more test_arrays.test.array initialization with function calls... OK All 4 tests passed. See also: for Slices Multidimensional Arrays Multidimensional arrays can be created by nesting arrays: test_multidimensional_arrays0 码力 | 241 页 | 7.37 MB | 1 年前3
The Zig Programming Language 0.11.0 Documentationboth the length, and the fact that they are null-terminated, and thus they can be coerced to both Slices and Null-Terminated Pointers. Dereferencing string literals converts them to Arrays. The encoding expectError demo... OK All 2 tests passed. The Zig Standard Library also contains functions to compare Slices, strings, and more. See the rest of the std.testing namespace in the Zig Standard Library for more . OK 4/4 test.array initialization with function calls... OK All 4 tests passed. See also: for Slices 11.1. Multidimensional Arrays Multidimensional arrays can be created by nesting arrays: test_0 码力 | 238 页 | 7.80 MB | 1 年前3
The Zig Programming Language 0.10.1 Documentationboth the length, and the fact that they are null-terminated, and thus they can be coerced to both Slices and Null-Terminated Pointers. Dereferencing string literals converts them to Arrays. The encoding expectError demo... OK 4 All 2 tests passed. The Zig Standard Library also contains functions to compare Slices, strings, and more. See the rest of the std.testing namespace in the Zig Standard Library for more 5 4/4 test.array initialization with function calls... OK 6 All 4 tests passed. See also: for Slices Anonymous List Literals Similar to Enum Literals and Anonymous Struct Literals the type can be0 码力 | 239 页 | 8.03 MB | 1 年前3
The Zig Programming Language 0.9.1 Documentationboth the length, and the fact that they are null-terminated, and thus they can be coerced to both Slices and Null-Terminated Pointers. Dereferencing string literals converts them to Arrays. The encoding "expectError demo"... OK 4 All 2 tests passed. The Zig Standard Library also contains functions to compare Slices, strings, and more. See the rest of the std.testing namespace in the Zig Standard Library for more 4/4 test "array initialization with function calls"... OK 6 All 4 tests passed. See also: for Slices Anonymous List Literals Similar to Enum Literals and Anonymous Struct Literals the type can be0 码力 | 234 页 | 7.90 MB | 1 年前3
The Zig Programming Language 0.6.0 Documentationboth the length, and the fact that they are null- terminated, and thus they can be coerced to both Slices and Null-Terminated Pointers. Dereferencing string literals converts them to Arrays. Character literals .OK 4/4 test "array initialization with function calls"...OK All 4 tests passed. See also: for Slices Anonymous List Literals Similar to Enum Literals and Anonymous Struct Literals the type can be terminated array"...OK All 1 tests passed. See also: Sentinel-Terminated Pointers Sentinel-Terminated Slices Vectors A vector is a group of Integers, Floats, or Pointers which are operated on in parallel0 码力 | 214 页 | 5.37 MB | 1 年前3
The Zig Programming Language 0.2.0 Documentationcompile-time array initalization...OK Test 4/4 array initialization with function calls...OK See also: for Slices Pointers test.zig const assert = @import("std").debug.assert; test "address of syntax" { ptr[1] += 1; assert(array[2] == 4); } test "pointer slicing" { // In Zig, we prefer using slices over null-terminated pointers. // You can turn a pointer into a slice using slice syntax: assert(slice.len == 2); // Slices have bounds checking and are therefore protected // against this kind of undefined behavior. This is one reason // we prefer slices to pointers. assert(array[3]0 码力 | 117 页 | 2.84 MB | 1 年前3
The Zig Programming Language 0.8.1 Documentationboth the length, and the fact that they are null-terminated, and thus they can be coerced to both Slices and Null-Terminated Pointers. Dereferencing string literals converts them to Arrays. The encoding Test [4/4] test "array initialization with function calls"... All 4 tests passed. See also: for Slices Anonymous List Literals Similar to Enum Literals and Anonymous Struct Literals the type can be terminated array"... All 1 tests passed. See also: Sentinel-Terminated Pointers Sentinel-Terminated Slices Vectors A vector is a group of booleans, Integers, Floats, or Pointers which are operated on in0 码力 | 234 页 | 6.01 MB | 1 年前3
The Zig Programming Language 0.7.1 Documentationboth the length, and the fact that they are null- terminated, and thus they can be coerced to both Slices and Null-Terminated Pointers. Dereferencing string literals converts them to Arrays. Character literals OK 4/4 test "array initialization with function calls"... OK All 4 tests passed. See also: for Slices Anonymous List Literals Similar to Enum Literals and Anonymous Struct Literals the type can be terminated array"... OK All 1 tests passed. See also: Sentinel-Terminated Pointers Sentinel-Terminated Slices Vectors A vector is a group of booleans, Integers, Floats, or Pointers which are operated on in0 码力 | 225 页 | 5.74 MB | 1 年前3
The Zig Programming Language 0.1.1 Documentationcompile-time array initalization...OK Test 4/4 array initialization with function calls...OK See also: for Slices Pointers const assert = @import("std").debug.assert; test "address of syntax" { // Get the ptr[1] += 1; assert(array[2] == 4); } test "pointer slicing" { // In Zig, we prefer using slices over null-terminated pointers. // You can turn a pointer into a slice using slice syntax: assert(slice.len == 2); // Slices have bounds checking and are therefore protected // against this kind of undefined behavior. This is one reason // we prefer slices to pointers. assert(array[3]0 码力 | 82 页 | 2.67 MB | 1 年前3
The Zig Programming Language 0.4.0 DocumentationOperators Table of Operators Precedence Arrays Vectors SIMD Pointers volatile Alignment allowzero Slices struct extern struct packed struct struct Naming enum extern enum packed enum union Tagged union initalization...OK Test 4/4 array initialization with function calls...OK All tests passed. See also: for Slices Vectors A vector is a group of Integers, Floats, or Pointers which are operated on in parallel that it cannot be c_void or any other @OpaqueType. These types are closely related to Arrays and Slices: *[N]T - pointer to N items, same as single-item pointer to array. Supports index syntax: array_ptr[i]0 码力 | 207 页 | 5.29 MB | 1 年前3
共 12 条
- 1
- 2













