Free Pascal with Terry

What are Arrays Good For?



* Lookup Tables * SQL queries are slow while arrays are fast. You can improve the time to execute big queries by moving the lookup tables to an array. * Display Arrays (Arrays to help display position or actual headings) * Statistical Calculations * a. Summation * b. Average * c. Standard Deviation (known as the Bell or Normal Curve) * String Manipulations * Sorting * Games * a. A card deck can be visualized as an array * b. chess, checkers and many other board games(chess board can be visualized as a two-dimensional array Modeling * a. Physical realities * aa. Biology (Game of Life is a simple biology simulation) * ab. Genetically analysis tables (Codon Table) are easily visualized as two-dimensional arrays * Scientific Observations * a. Environmentalists and Biologists often break down an area they are studying into a Grid, then the values they observe can be entered into an Array for statistical analysis. * Calendars can be visualized as an Array * Matrix Math uses Arrays * Arrays are the most common structure in Data Processing and you are only limited by your imagination and resources. It can be argued that Arrays are the Swiss Army Knife of the programmer's toolkit.