The include file lists.bm provides a number of symmetric functions for
handling lists. There are functions for initializing lists, for inserting
and removing nodes, for adding and removing head and tail nodes, for
inserting nodes in a priority order, for searching for nodes by name, for
checking list emptiness, and for scanning lists.
List handling Functions
-----------------------
SUB NewList (list&)
SUB Insert (list&, node&, pred&) 'pred& represents a node& here too
SUB Remove (node&)
SUB AddHead (list&, node&)
SUB AddTail (list&, node&)
FUNCTION RemHead& (list&)
FUNCTION RemTail& (list&)
SUB Enqueue (list&, node&)
FUNCTION FindName& (list&, mstr&, text$, flags&) 'list& may also be a node&
FUNCTION IsListEmpty& (list&)
FUNCTION GetHead& (list&)
FUNCTION GetTail& (list&)
FUNCTION GetSucc& (node&) 'node& may also be a list&
FUNCTION GetPred& (node&) 'node& may also be a list&
In this discussion of the list handling functions, list& represents a
pointer to a (Min)ListHeader& structure, and node& represents a pointer
to a (Min)ListNode& structure, which is usually the carrier structure
for the node's content.
Initializing new Lists
Insertion and Removal
Special Case Insertion
Special Case Removal
Prioritized Insertion
Searching by Name
Empty Lists
Scanning a List
Back to List Overview