Forum Discussion
kbenson
16 years agoVisitor
Consistent indentation helps a lot. Note in your first example that the end while and end function are two levels of indentation away, instead of one. That's a dead ringer that you wither didn't indent/unindent correctly at a point, or are missing a block closing statement.
I find what helps me most, in any language, is to immediately write the block's ending statement after writing the opening, and then moving up and indenting to write in the complete block I just created. That way, I never have to remember to close a block, just to move past the existing close statement, which is easy to see.
I find what helps me most, in any language, is to immediately write the block's ending statement after writing the opening, and then moving up and indenting to write in the complete block I just created. That way, I never have to remember to close a block, just to move past the existing close statement, which is easy to see.