Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, it would have to be something like this if you wanted to avoid the signed integer overflow at the end of the loop:

  assert(i <= j);
  for (;;) {
      do_something_with(i);
      if (i == j)
          break;
      i++;
  }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: