protected int[] determineIndices(int numAttributes) throws Exception {
    int[]		result;
    Vector<Integer>	list;
    int			i;
    StringTokenizer	tok;
    String		token;
    String[]		range;
    int			from;
    int			to;
    
    list = new Vector<Integer>();
    
    // parse range
    tok = new StringTokenizer(m_NewOrderCols, ",");
    while (tok.hasMoreTokens()) {
      token = tok.nextToken();
      if (token.indexOf("-") > -1) {
	range = token.split("-");
	if (range.length != 2)
	  throw new IllegalArgumentException("'" + token + "' is not a valid range!");
	from = determineIndex(range[0], numAttributes);
	to   = determineIndex(range[1], numAttributes);

	if (from <= to) {
	  for (i = from; i <= to; i++)
	    list.add(i);
	}
	else {
	  for (i = from; i >= to; i--)
	    list.add(i);
	}
      }
      else {
	list.add(determineIndex(token, numAttributes));
      }
    }
    
    // turn vector into int array
    result = new int[list.size()];
    for (i = 0; i < list.size(); i++)
      result[i] = list.get(i);
    
    return result;
  }