Difference between revisions of "Structure"

From Computer History Wiki
Jump to: navigation, search
(Improve clarity)
m (Proper cat)
Line 3: Line 3:
 
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.
 
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.
  
{{stub}}
+
{{semi-stub}}

Revision as of 15:38, 21 October 2018

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 procedure.

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.