Lists and Collections Library

Previous  Next

 

This library contains functions to create and maintain lists and collections.  A list is a dynamic array that can grow or shrink as needed.  Each entry in a list can contain several items of different basic types, essentially creating a simple record/structure.  Functions to search and sort are also available.

 

The lists are similar to C/C++ Standard Library <array> Container or MFC CObArrays.

 

Definitions

 

LID

List ID.  Identifies a list.  The Create function will generate a unique ID for each list.

LEX

List Element Index.  This is the index into the List.  A List contains an number of List Elements.  Each List Element can contain a number of Items.  Each Item may be of different type creating a simple record or structure.  Element Items are identified by an IIX.  Element and Item indexes are based on OPTION BASE

ITX

Item Index.  This is the index into each item in a List Element.  Based on OPTION BASE

 

 

To use the library, include the following

 

$INCLUDE "MyBASIC2_ListCol"

$LIBRARY "MyBASIC2_ListColLib"