Array (data structure): Difference between revisions

Content deleted Content added
GareginRA (talk | contribs)
<ref> readjustment:-text, -<sup>, +{{TAOCP}}
Line 20:
 
==History==
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>Donald Knuth, ''[[The Art of Computer Programming]]'', vol. {{TAOCP|volume=3. Addison-Wesley|page=159}}</ref><sup>p.&nbsp;159</sup> 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" />