Methods of array and dict



Return Method Function
dyn begin() points out the first item.
dyn dec() decrements the pointer.
void display() displays the array.
dyn end() points out the last item.
boolean empty() returns true if array empty.
int find(dyn) searches for an item, return the index or nil.
void flip() values become keys and conversely.
dyn inc() increments the pointer.
int index() returns the index of the pointed out item.
void insert(int, dyn) inserts a value at the integer (not key) position.
text join(text sep) converts into text with sep between elements.
text key() returns the key of the pointed out item.
void kSort() orders the indices, associations being preserved.
boolean load(text) loads the file into the array (see "file" in Php).
dyn min() gets the lowest value.
dyn max() gets the highest value.
void pack() Makes elements of the array consecutives.
dyn pop() gets and removes the last item.
dyn pop(int) gets and removes the item at the given position
void push(dyn) adds an item at end.
dyn rand() returns an item at random location.
liste reverse() inverts the list of element (last one becomes first one).
dyn shift() gets and removes the first item.
int size() returns the number of elements.
void sort() sorts the values in ascending order. Packs.
void store(text) stores the array into a file.
number sum() calculates the sum of items.
void unique() removes doubloons from values.
For numbers first kept, for others last kept.
void unshift(dyn) inserts an item at the first position. Packs.
dyn value() gets the value pointed out.
k,v = d.key(), d.value() reads the couple key:value