Requests for sequence.e and search.e
- Posted by CChris <christian.cuvier at agriculture.go?v.fr> May 07, 2008
- 529 views
1/ apply_func(sequence s,integer rid) Applies the function rid is the routine_id() of to the sequence s, and returns the result. The order in which element are acted upon is implementation dependent. The function must take an integer (the index) and anobject (the current value), and returns the new value for the requested element. Notionally, it could be implemented as:
global function apply_func(sequence s,integer rid) for i=1 to length(s) do s[i]=call_func(rid,{i,s[i]}) end for return s end function
2/ apply_proc(sequence s,integer rid) Sam as apply_func(), but rid is the routne_id of a procedure instaed. 3/ find_using(integer rid,sequence s) Returns the smallest index such that call_func(rid,{i,s[i]}) returns a nonzero value. 3'/ find_using_from(), rfind_usin() and rfind_using_from(). They would all be best implemented in an include file. CChris