A poly bag is a container implemented as a hashtable. It supports most PowerBASIC types, case sensitive and case insentive string comparisons using binary collations. The bag dynamically expands as needed or you can pre-expand the bag if you know how many items will go into it.

Basic operations are: Initialize, release, add an item, get count, get max items, get index by key, get item by index, remove item by index, remove item by key, clear, release internal memory, dynamically allocate and free a bag.

There is also an optional iterator that can iterate over the items in the bag.

Operations of the iterator are: Reset, move next, get index, get item.

Samples include an associative array, storing memory handles, allocating a bag that contains dynamically allocated strings, accessing fixed length records by key, and an iterator exampel. In addition there is a test suite for the supported types, and interactive tester, and a dynamic string speed test.