Next Previous Contents

3. ARRAY_KEYS object

#Specification: ARRAY_KEYS / principles ([,6])

An ARRAY_KEYS object is a table holding pairs of values. One value is the key, a string and the other is an object derived from the ARRAY_OBJ class. While the ARRAY_KEYS may be managed somewhat like the parent class ARRAY, adding items, getting items using a numeric index (using the getitem() member function), the real purpose is to request the value of the stored object using the string key. We call this an associative array, where the index is a string, not an integer. The main usage of ARRAT_KEYS is the class STRING_KEYS, where the value is another string. Note that such a functionality can by implemented using two SSTRINGS table. One store the key and the other store the value. You use the lookup function to retrive the position of the key and use that value to retrieve the string value in the other table. The goal here is to avoid redundancies in the code.

3.1 ARRAY_KEYS alphabetical function listing

Classe ARRAY_KEYS, vue publique

3.2 ARRAY_KEY alphabetical function listing

Classe ARRAY_KEY, vue publique

Next Previous Contents