The function adds new value to a string array but only if that value doesn't exist in it yet. So, if the whole array is populated using this function only, then, finally, all its elements will be unique. You need to have the function uf_value_exists_in_array() prior to adding uf_add_unique_element_to_array(). It has 2 overloads - for string and long data types:
/********************************************************************************************************************** Dscr: Adds new value to a STRING array but only if that value doesn't exist in it yet. So, if the array is populated using this function only, then, finally, all its elements will be unique. Another overload does the same for LONG array. *********************************************************************************************************************** Arg: as_val - added value rs_arr[] (ref) - array to add value to *********************************************************************************************************************** Developer: Michael Zuskin - http://linkedin.com/in/zuskin | http://code.intfast.ca/ **********************************************************************************************************************/ long ll_new_upper_bound DataStore lds_temp
if this.uf_value_exists_in_array(as_val, rs_arr[]) then // uf_value_exists_in_array(): http://code.intfast.ca/viewtopic.php?f=4&t=93 return end if
/********************************************************************************************************************** Dscr: Adds new value to a LONG array but only if that value doesn't exist in it yet. So, if the array is populated using this function only, then, finally, all its elements will be unique. Another overload does the same for STRING array. *********************************************************************************************************************** Arg: al_val - added value rl_arr[] (ref) - array to add value to *********************************************************************************************************************** Developer: Michael Zuskin - http://linkedin.com/in/zuskin | http://code.intfast.ca/ **********************************************************************************************************************/ long ll_new_upper_bound DataStore lds_temp
if this.uf_value_exists_in_array(al_val, rl_arr[]) then // uf_value_exists_in_array(): http://code.intfast.ca/viewtopic.php?f=4&t=93 return end if