diff options
| author | Jason Ho <jasonho353@gmail.com> | 2022-08-31 20:53:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-31 21:53:00 -0400 |
| commit | 2b92c5a23e912df56885ff10d690ff7bfd1e3f47 (patch) | |
| tree | 9151f5152df9d05c407707993a087a982144a8d2 /doc | |
| parent | 7a733b9385e77bc6b9aa1c62ca180a6ba9f14f3f (diff) | |
| download | zig-2b92c5a23e912df56885ff10d690ff7bfd1e3f47.tar.gz zig-2b92c5a23e912df56885ff10d690ff7bfd1e3f47.zip | |
langref: tweak description of `[]T` (#12319)
saying []T is a pointer is confusing because zig docs say there are two types of pointers (*T and [*]T). It is more clear to say that []T is a slice type which contains a [*]T pointer and a length.
Co-authored-by: Philipp Lühmann <47984692+luehmann@users.noreply.github.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 0d10119cb7..162ba44700 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -2631,7 +2631,7 @@ test "Conversion between vectors, arrays, and slices" { </li> </ul> <ul> - <li>{#syntax#}[]T{#endsyntax#} - pointer to runtime-known number of items. + <li>{#syntax#}[]T{#endsyntax#} - is a slice (a fat pointer, which contains a pointer of type {#syntax#}[*]T{#endsyntax#} and a length). <ul> <li>Supports index syntax: {#syntax#}slice[i]{#endsyntax#}</li> <li>Supports slice syntax: {#syntax#}slice[start..end]{#endsyntax#}</li> |
