Languages Features Calendar About Lists Add Language
GitHub icon



Structs are a language feature.

A composite data type (or record) declaration that defines a physically grouped list of variables to be placed under one name in a block of memory, allowing the different variables to be accessed via a single pointer.

Languages with Structs include C, Ion

Example from C:

struct account { int account_number; char *first_name; char *last_name; float balance; };

Example from Ion:

{ 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

Article source

PLDB - Build the next great programming language. v5.0.0 - Acknowledgements · Email · GitHub