Arrays

An array literally is a list contained in a single variable. Each item in the list is known as an array element and is enclosed in square brackets ([]). When you create an array, it is initialized with the specified values as its elements. Its length is set to the number of elements specified. The following example creates the coffeelist array with three elements and a length of three:

coffeelist = ["French Roast", "Columbian", "Kona"];

Multidimensional Arrays are represented by an array of arrays. A multidimensional array (rows and columns) may be created as follows:

monthly_rain = [['Jan', 'Feb', 'Mar'],

                [100,10,30],

                [30,10,300],

                [10,10,10]];

<< Date Type © 1996-2013 InetSoft Technology Corporation (v11.4) Conditionals >>