Control flow troubles

t's more what you failed to do. That is, you failed to put each { on a new line. You failed to use Tools + Auto Format to fix the indenting.

Code that bounces
all over the place is
very hard to read. The
Tools + Auto Format
menu item
fixes that problem.

I do use Auto Format it's just I can't stand the bracket taking up an extra line. Never thought it can be a problem.