•At the end of the "true" branch, the branching condition is tested again. If the condition is true again, the "true" code block is performed again and again until the branching condition is false.
•There is no else part. If the branching condition is false, the whole while block is skipped.
Consider the following source code.
// do something
When compiled it generates the following (the letters in the margin are added here for illustration purposes).
a) 0008 IF_001 @bCondition jne+0002
b) 0010 JMP-0001 //GOIF_001
c) 0010 ENDF_001
We see that the code sequence is as follows
ab // every loop
ab // …
ac // until bCondition is false and jne+0002 jumps to c
While the while keyword is different in source code, at the level of the compiled code, it is not very different from if.