Array (data structure): Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
m Reverted edits by 2409:4085:9207:E25:0:0:2B32:90AD (talk) to last version by DMacks
Line 19:
The term is also used, especially in the description of [[algorithm]]s, to mean [[associative array]] or "abstract array", a [[theoretical computer science]] model (an [[abstract data type]] or ADT) intended to capture the essential properties of arrays.
 
==History of array==
The first digital computers used machine-language programming to set up and access array structures for data tables, vector and matrix computations, and for many other purposes. [[John von Neumann]] wrote the first array-sorting program ([[merge sort]]) in 1945, during the building of the [[EDVAC|first stored-program computer]].<ref>{{TAOCP|volume=3|page=159}}</ref> Array indexing was originally done by [[self-modifying code]], and later using [[index register]]s and [[Addressing mode|indirect addressing]]. Some mainframes designed in the 1960s, such as the [[Burroughs large systems|Burroughs B5000]] and its successors, used [[memory segmentation]] to perform index-bounds checking in hardware.<ref>{{citation|title=Capability-based Computer Systems|first=Henry M.|last=Levy|publisher=Digital Press|year=1984|isbn=9780932376220|page=22}}.</ref>
 
Assembly languages generally have no special support for arrays, other than what the machine itself provides. The earliest high-level programming languages, including [[Fortran|FORTRAN]] (1957), [[Lisp (programming language)|Lisp]] (1958), [[COBOL]] (1960), and [[ALGOL|ALGOL 60]] (1960), had support for multi-dimensional arrays, and so has [[C (programming language)|C]] (1972). In [[C++]] (1983), class templates exist for multi-dimensional arrays whose dimension is fixed at runtime<ref name="garcia" /><ref name="veldhuizen" /> as well as for runtime-flexible arrays.<ref name="andres" />
 
==Applications of array==
Arrays are used to implement mathematical [[coordinate vector|vectors]] and [[matrix (mathematics)|matrices]], as well as other kinds of rectangular tables. Many [[database]]s, small and large, consist of (or include) one-dimensional arrays whose elements are [[record (computer science)|record]]s.