The idea is this. I have an index array, and a value array. I want to get the index by searching through the index array, and then set the corresponding position in the value array to that something. There are two ways I can do this:
orCode:var_pos = get_index(var_names,search); var_vals[var_pos] = new_Value;
Which one's the prefered method?Code:var_vals[get_index(var_names,search)] = new_Value;