How do you convert for loop to while loop?

Answer:
A for loop is classified as an iteration statement. A simple example might be...

For x = 1 To 10
'loop body
Next x

The same loop expressed as a while loop (classified as a control flow statement) could be...

x = 0
Do While x < 11
'loop body
x = x + 1
Loop



.
Note: There are comments associated with this question. See the discussion page to add to the conversation.
First answer by Timowers. Last edit by Timowers. Contributor trust: 9 [recommend contributor recommended]. Question popularity: 2 [recommend question].