---------------------------------------------------------------------------- /* ---------------------------------
- - -   U t i l i t i e s   - - -
---------------------------------
function ToPositiveInteger(x, rangeErrorIndex) {
  var i = TO_INTEGER(x) + 0;
  if (i < 0) throw MakeRangeError(rangeErrorIndex);
  return i;
}