Difference between revisions of "Array"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
Example for a standard array : | Example for a standard array : | ||
array | array FRUITS = ["apple" , "banana", "strawberry"]; | ||
here | here FRUITS[1] = "banana" | ||
Example for an associative array : | Example for an associative array : | ||
array | array EXAMPLE; | ||
EXAMPLE["fruit"] = "apple"; | |||
EXAMPLE["beverage"] = "coffee"; | |||
EXAMPLE["meat"] = "chicken"; | |||
Revision as of 00:05, 27 July 2007
An array is a data structure consisting of a group of elements having a single name that are accessed by indexing. These elements can be of all other types like float, string or vector.
Example for a standard array :
array FRUITS = ["apple" , "banana", "strawberry"];
here FRUITS[1] = "banana"
Example for an associative array :
array EXAMPLE;
EXAMPLE["fruit"] = "apple";
EXAMPLE["beverage"] = "coffee";
EXAMPLE["meat"] = "chicken";
Functions: