insert_list
synopsis: INT insert_list(OP element, list
description:
inserts the element into the LIST object list.
The second parameter list must be a LIST object.
There is no test, whether
it is a LIST object. This routine is called by the
general routine insert(), which has the same syntax.
compfunction is the function for the comparision of
the element to insert and the objects, which are
already in the list. The list is assumed to be ordered
in increasing order. The compfunction is called with two
arguments, the element and s_l_s(actual position).
The return value is <0 , 0 , >0 like the standard
routine comp(). The function eqhandle is called when
the element is already in the list. (i.e. comparsion
gives 0) It is called with two arguments the element
and s_l_s(actual position). If after the call of
eqhandle the entry in the list is the empty object,
it means that the entry was deleted, this entry is
removed from the list. (e.g. cancellation in a
polynomial)
In the case the first parameter element is a LIST object
this routine is a merge of two lists.
In general it is not good to delete an element
which was inserted into list, because this destroys
the list, since it generates a hole in the list.
If you call insert with NULL for the two functionpointer, you
use the standard comparsion comp(), and no insertion in the
case of comp()=0
Send comments or suggestions to:
symmetrica (at) symmetrica
this page was automatically generated on So Aug 10 12:23:24 CEST 2008 on the machine btn6xa