= Record type
A <record type> is a <data type> whose values contain a specified collection of named fields, each with its own type. A record describing a point might have numeric fields `x` and `y` and a text field `label`. Selecting `point.x` identifies a component by its field name. <Oberon> defines records in this way and permits record extension by additional fields.<The Programming Language Oberon by Niklaus Wirth>[§6.3 Record types; §8.1 Designators]{ref}
The logical grouping is distinct from its byte layout. An implementation may insert padding to satisfy <memory alignment>; for example, a small integer field followed by a larger one need not occupy exactly the sum of their payload sizes. In <C programming language>, the corresponding aggregate is a structure, with field ordering and padding governed by the language's representation rules.<C11 committee draft N1570>[§6.7.2.1, structure members, alignment and padding]{ref}
Back to article page