| ... | ... | @@ -5474,19 +5474,14 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val |
| 5474 | 5474 | {#header_close#} |
| 5475 | 5475 | |
| 5476 | 5476 | {#header_open|@splat#} |
| 5477 | | <pre>{#syntax#}@splat(scalar: anytype) anytype{#endsyntax#}</pre> |
| 5477 | <pre>{#syntax#}@splat(element: anytype) anytype{#endsyntax#}</pre> |
| 5478 | 5478 | <p> |
| 5479 | 5479 | Produces an array or vector where each element is the value |
| 5480 | | {#syntax#}scalar{#endsyntax#}. The return type and thus the length of the |
| 5481 | | vector is inferred. |
| 5480 | {#syntax#}element{#endsyntax#}. The return type, including the number of |
| 5481 | elements, is inferred. |
| 5482 | 5482 | </p> |
| 5483 | 5483 | {#code|test_splat_builtin.zig#} |
| 5484 | | |
| 5485 | | <p> |
| 5486 | | {#syntax#}scalar{#endsyntax#} must be an {#link|integer|Integers#}, {#link|bool|Primitive Types#}, |
| 5487 | | {#link|float|Floats#}, or {#link|pointer|Pointers#}. |
| 5488 | | </p> |
| 5489 | | {#see_also|Vectors|@shuffle#} |
| 5484 | {#see_also|Vectors|Arrays|@shuffle#} |
| 5490 | 5485 | {#header_close#} |
| 5491 | 5486 | |
| 5492 | 5487 | {#header_open|@reduce#} |