Array Service Extension |
Ver. 1.02 Contributed by Lijun Yang |
What
n_cst_array
Why
Provide functions
How
To sort data of an array, call integer of_sort (ref any aa_list[], integer ai_order)
Where:
aa_list[] is the array to be sorted;
ai_order is the flag to specify how to sort data, ascendingly or descendingly.
When ai_order = 0, the array is sorted ascendingly.
When ai_order = 1, the array is sorted decendingly.
You can also call of_Sort (Ref any aa_list[]) to sort an array ascendingly.
To insert an element or array into an array, call integer of_insert (ref any aa_list[], any aa_element, long al_position)
Where:
aa_list[] is the array to be inserted;
aa_element is the element or array to be inserted into aa_list[];
al_position is the position of the array where the element is inserted.
You can also call of_add (ref any aa_list[], any aa_element) to add an element or array to the end of an array.
To remove elements from an aray, call integer of_remove (ref any aa_list[], long al_pos, long al_len)
Where:
aa_list[] is the array whose elements to be removed;
al_pos is the starting position of elements to be removed;
al_len is the number of elements to be removed.You can also call of_remove (ref any aa_list[], long al_position) to remove a single element from an array.
To find an element in an aray, call integer of_find (ref any aa_list[], any aa_element, long al_start, long al_end)
Where:
aa_list[] is the target array;
aa_element is the element to be found
al_start is the starting position of the array to find the element;
al_end is the ending position of the array to find the element.
You can also call of_find (ref any aa_list[], any aa_element) to find an element in the whole range of an array;
or call of_find (ref any aa_list[], any aa_element, long al_start) to find an element from a specific position to the end of an array.
Download the | About the extension contributor |
Revision History | ||
10/13/1997 | Initial Revision | Ver. 1.00 |
12/09/1997 | Added of_find() function | Ver. 1.01 |
01/09/1998 | Enhanced the of_insert () to allow one array to insert into another. | Ver. 1.02 |
Interested in contributing material to this web site? Send an email to submit@pfcguide.com, but don't forget to check the contribution guidelines first.
For information or suggestions about this web site please contact webmaster@pfcguide.com
PFCGuide is
sponsored by Dynamic Technology Group.
The information on this site is provided for advice only and not to be considered a
contract or a liability against Dynamic
Technology Group.