int index, ulong rc, float delta = 0;

search:min_element (array, length, (float x, int i) { 
                                                      if (a < delta, { a = abs (x - level) })
                                                      {
                                                        delta = a; index = i; rc = 1;
                                                      }
                                                    }),
{
  level = statistics:CS_LEVEL, { statistics = settings->statistics }
};
