mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
link to Tuples section in Hello World docs, and give an example of an empty tuple
This commit is contained in:
parent
9c45fb4b09
commit
3f245616a5
1 changed files with 3 additions and 3 deletions
|
|
@ -379,9 +379,9 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In this case, the {#syntax#}!{#endsyntax#} may be omitted from the return
|
In this case, the {#syntax#}!{#endsyntax#} may be omitted from the return
|
||||||
type because no errors are returned from the function.
|
type of <code>main</code> because no errors are returned from the function.
|
||||||
</p>
|
</p>
|
||||||
{#see_also|Values|@import|Errors|Root Source File|Source Encoding#}
|
{#see_also|Values|Tuples|@import|Errors|Root Source File|Source Encoding|try#}
|
||||||
{#header_close#}
|
{#header_close#}
|
||||||
{#header_open|Comments#}
|
{#header_open|Comments#}
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -2295,7 +2295,7 @@ or
|
||||||
|
|
||||||
{#header_open|Tuples#}
|
{#header_open|Tuples#}
|
||||||
<p>
|
<p>
|
||||||
Anonymous structs can be created without specifying field names, and are referred to as "tuples".
|
Anonymous structs can be created without specifying field names, and are referred to as "tuples". An empty tuple looks like <code>.{}</code> and can be seen in one of the {#link|Hello World examples|Hello World#}.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The fields are implicitly named using numbers starting from 0. Because their names are integers,
|
The fields are implicitly named using numbers starting from 0. Because their names are integers,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue