The SUB Insert is used for inserting a new node into any position in
a list.  It always inserts the node following a specified node that is
already part of the list.  For example, "Insert list&, node&, pred&"
inserts the node node& after the node pred& in the specified list&.
If the pred& node points to the list header or is zero, the new node
will be inserted at the head of the list.  Similarly, if the pred& node
points to the lh_Tail& of the list, the new node will be inserted at
the tail of the list.  However, both of these actions can be better
accomplished with the SUBs AddHead and AddTail.

The SUB Remove is used to remove a specified node from a list.  For
example, "Remove node&" will remove the specified node& from whatever
list it is in.  To be removed, a node must actually be in a list.
If you attempt to remove a node that is not in a list, then you may cause
serious corruption to the administrative structure of the GP Memory system
implemented with the memory.bi/.bm include files, or you may destroy any
objects stored in this memory region.  So in fact, if you get those memory
corruption errors, then don't forget to check, if you unintentionally
remove any nodes, which are not linked into a list.

                                                     Back to List Functions