|
array| In computer programming, a list of values that can all be referred to by a single variable name. Separate values are distinguished by using a subscript with each variable name. |
| Arrays are useful because they allow programmers to write general routines that can process long lists of data. For example, if every price stored in an accounting program used a different variable name, separate program instructions would be needed to process each price. However, if all the prices were stored in an array, a general routine could be written to process, say, ‘price(J)’, and, by allowing J to take different values, could then process any individual price. |
| For example, consider this list of highest daily temperatures: day 1 - 22°C; day 2 - 23°C; day 3 - 19°C; day 4 - 21°C. This array might be stored with the single variable name ‘temp’. Separate elements of the array would then be identified with subscripts. So, for example, the array element ‘temp(1)’ would store the value ‘22’, and the array element ‘temp(3)’ would store the value ‘19’. |
How to thank TFD for its existence? Tell a friend about us, add a link to this page, add the site to iGoogle, or visit webmaster's page for free fun content. |
?Sign in  |
|---|
|
|
|