The do-loop is just a loop. Basically when the computer reaches the loop it jumps back to the do, much like the for-next loop, except it goes on forever and doesn't incriment a variable.
Whenever trying to understand a program, think of the value of the variable. At the beginning time equals 0, and timer() is the processor time in milliseconds, ie. it may read 100000 now, so in 1 seconds time it will read 101000 (as 1000 milliseconds equals 1 second). It just returns the time in milliseconds, instead of hours, minutes and seconds.
So timer() usually will equal more than 1000, so timer()-time (time equals 0) will be more than 1000, so we incriment n ("inc n" is the same as "n=n+1"), clear the screen, print the percent done, and print the message. We then store the current timer() value in the variable "time", so they equal the same thing. We also check to see if n>100, in which case we end the program (this has the same effect as the for-next loop). You could also use "exit" to exit the do-loop loop if there was something after the loop.
Now we loop back to the beginning. Remember timer()=time, they were both the same, and it is very likely that they will be about the same now, so timer()-time will equal something lower than 1000, so we do not do what is inside the if statement. The only way that timer()-time will be more than 1000 is if timer() is 1000 more than time. As timer() returns the time in milliseconds, we will have to wait till it is 1000 milliseconds AFTER we made time equal to timer(which is also since the last time we counted on 1 percent). When 1000 ms has passed we will count on one and make time=timer() once again. The process then continues until we have counted 100 seconds, and the program ends.
I hope I explained that well, tell me if it helped or not.
Trying is the first step towards faliure.
Athelon XP 1600+/Radeon 9600 Pro/256 RAM