Structure

From Computer History Wiki
Revision as of 14:31, 1 May 2025 by Jnc (talk | contribs) (Avoid redir)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Structures are a mechanism available in most programming languages for creating a named block of associated data values (usually of mixed types), effectively an extended type; the elements have individual sub-names. Instances of the structure can then be used in various ways - e.g. by being passed as an argument to a subroutine.

One common use is to have an array of a particular kind of structure; without structures, the program would have to have N arrays, one for each data item in the structure.