They are identicdal in terms of speed and memory consumption. You can always substitute a while loop for a for loop, but not the other way around. The for loop is preferable when you know exactly how many loop iterations there will be. The while loop may be necessary when the exact number of iterations is not known. Otherwise except for the syntax the two loops are the same.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343