User:Brian P. Josey/Notebook/2010/08/10
|Project name|| Main project page|
Previous entry Next entry
Arrays are groups of data elements that have are composed of the same type. Each array consists of the elements, and dimensions that specify the number of elements possible and their orientation in respect to how they are stored. They are ordered and can be indexed. A simplified example on how to create an array, is to generate a string of random numbers, and organize them into the array. To do this, you could simply create a for loop that generates a random number, and output it to an array. To create a two dimensional array, nest a for loop into another. The inner loop will create the columns, while the outer loop will create the rows.
Several important functions that can act on an array are:
Clusters are similar to arrays in that they bundle different pieces of data together, but are different in that arrays only bundle together data of the same type, while a cluster generalizes this to several different types of data. While an array could be thought as a dictionary, containing only the definitions for words, a cluster would be a multiple subject notebook, with notes on physics, history and French cuisine on different pages.