Easy way to keep counting up infinitely
- by Andrew Alexander
What's a good way to keep counting up infinitely? I'm trying to write a condition that will keep going until there's no value in a database, so it's going to iterate from 0, up to theoretically infinity (inside a try block, of course).
How would I count upwards infinitely? Or should I use something else?
I am looking for something similar to i++ in other languages, where it keeps iterating until failure.