MarksStoreArray class

From m204wiki
Revision as of 15:56, 4 February 2011 by Alex (talk | contribs)
Jump to navigation Jump to search

The MarksStoreArray class was written for Marks and Spencer a UK retailer. The index for MarksStoreArray items is a a three-digit Marks and Spencer store code so is not likely to be useful to anyone other than Marks and Spencer.

The MarksStoreArray class is a limited collection class — the declaration of a MarksStoreArray variable requires an Of clause follow by a datatype, where the datatype can only be a String, Float, or Fixed datatype. As such, it is considerably less useful than the NamedArraylist class. It's main advantage over NamedArraylists is that all collection items are stored in STBL so that the access path for a MarksStoreArray object is very efficient, indeed, and so can be useful in situations where there is heavy access to lots of different string or numeric values, based on frequently changing store codes.

Example

The following example sets the value of an item associated with store code ABC to 22:

begin %quantity is collection marksStoreArray of float %quantity = new %quantity('ABC') = 22 end