struct account {
int account_number;
char *first_name;
char *last_name;
float balance;
};
record
struct Test
{
int x;
float y;
String z;
}
struct User {
id: Int
name: String
mut email: String
}
(struct point
(let x float)
(let y float)
)
struct Employee {
first_name: str
last_name: str
salary: f32
}
struct Fuel
|int| A
|byte| B
{ first : "Tom" , last: "Riddle" } // Structure with two fields
{"first":"Tom","last":"Riddle"} // The same value with confusing style
{center:{x:1.0, y:12.5}, radius:3} // Nested struct
Languages with Structs include C, Chapel, C3, MoonBit, progsbase, C2, Wax, Jule, Speedie, Ion
View all concepts with or missing a hasStructs measurement
Read more about Structs on the web: 1.