Next: , Up: The List Library   [Index]


13.3.1 Non Data Type Specific List Functions

l_cast

void l_cast(list l, list t);

empties the l list and links or copies the content of the t list in l (data references are made where the types allow, copies where not)

l_class

list l_class(list l);

is l, deletes the first element in the l list

l_clear

list l_clear(list l);

is l, empties the l list

l_copy

void l_copy(list l, list t);

empties the l list and copies the content of the t list in l

l_delete

list l_delete(list l, integer m);

is l, deletes the m indexed element of the l list

l_down

void l_down(list l, integer m);

decrements the m indexed element in the l list (the element type is intrinsic numerical)

l_edit

list l_edit(list l, integer p, integer e);

is l, deletes e elements in the l list immediately after the p position if e is positive, -e elements immediately before p if e is negative

l_erase

list l_erase(list l, integer p, integer q);

is l, deletes the p to q indexed elements of the l list. If q indicates an element prior to p the elements starting with the p indexed one to the end of the list and those from the beginning of the list to the q indexed one are deleted (as if l was circular).

l_id

integer l_id(list l, integer m);

is the type ID of the m indexed element in the l list

l_length

integer l_length(list l);

is the length (i.e. number of items) of the l list

l_move

void l_move(list l, integer m, integer n);

moves the m indexed element of the l list in the n position

l_new

void l_new(list &l);

sets the l list as a new list (same as ‘l_clear’ if l is not linked multiple times, otherwise creates a new list and sets l as a reference to the new list)

The function is generated on request only.

l_offset

void l_offset(list l, integer m);

shifts (rotates/circulates) the l list (as if it was a circular list) until the (m % <list size> + <list size>) % <list size> element becomes the first

l_post

void l_post(list l, integer m, list t, integer n);

moves the m indexed element of the l list in the n position in the t list

l_rand

list l_rand(list l);

is l, shuffles the content of the l list

l_reverse

list l_reverse(list l);

is l, reverses the order of the elements in the l list

l_rcall

object l_rcall(list l, object o, integer p, integer b, integer e, &...);

is the return of the function indicated by o called with the unnamed arguments and the b to e elements in the l list inserted at the position p in between the unnamed arguments.

The variadic arguments are passed by reference where possible.

If e indicates an element prior to b the elements starting with the b indexed one to the end of the list and those from the beginning of the list to the e indexed one are used (as if the list was circular).

l_set

list l_set(list &l, list t);

is t, sets the l list as a reference of the t list

The function is generated on request only.

l_short

list l_short(list l);

is l, deletes the last element in the l list

l_spin

void l_spin(list l, integer m, integer n);

exchanges the m and n indexed elements in the l list

l_swap

void l_swap(list l, list t);

exchanges the content of the l and t lists.

The function visits every item in the two collections.

l_trade

void l_trade(list l, integer m, list t, integer n);

exchanges the m indexed element in the l list and the n indexed element in the t list

l_type

text l_type(list l, integer m);

is the type name of the m indexed element in the l list

l_up

void l_up(list l, integer m);

increments the m indexed element in the l list (the element type is intrinsic numerical)

l_xcall

object l_xcall(list l, object o, &...);

is the return of the function indicated by o called with all the variadic arguments of l_xcall and all the elements of the l list

The variadic arguments are passed by reference where possible.


Next: , Up: The List Library   [Index]