Be careful when moving lines of code

22. December 2010 Uncategorized 0

Going from

do {
}while (x == true);

to

while(x == true) { }

Should simply change it from always executing the first time, to only when the condition is true. However, going to

while(x == true); { }

will create an endless loop (notice the semicolon)