Compound data type: Difference between revisions

Content added Content deleted
(→‎Class instance: minor simplifications, + type constraint)
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
Line 2,710: Line 2,710:
End Structure</syntaxhighlight>
End Structure</syntaxhighlight>


=={{header|Vlang}}==
=={{header|V (Vlang)}}==
Vlang also supports embedding structs into other structs and assigning methods to structs.
Vlang also supports embedding structs into other structs and assigning methods to structs.
<syntaxhighlight lang="vlang">struct Point {
<syntaxhighlight lang="v (vlang)">struct Point {
x int
x int
y int
y int