Gerhard Fiedler wrote: > Everybody indents code according to the block structure, and the > differences people get in each others' hairs about are almost only > about where to place the braces (in C dialects :). No braces or other > block terminators needed in Python. Of course a few C constructs > wouldn't be possible with this, and maybe I should take C (as a > high-level assembler) out of this list, but for the other languages > this would only feel so natural. I haven't looked at Python (and don't plan on it since it's apparently just an interpreter), so I don't know how its block structure really works. Block scope by indentation is an interesting idea, but I see one problem with it. I indent Pascal according to block nesting too, but sometimes I cheat because otherwise the left end of the line would be too far to the right and there wouldn't be enough room for a meaningful comment after most lines. In those cases I jump back to no indentation level and continue indenting from there, then jump back when the level pops back to where it was. This is usually done at major breaks where there is a paragraph comment anyway. Another place I do this routinely is in the cases of a CASE statement (like a SWITCH statement in C). Often each case has a paragraph comment in front of it, and it's just easier and looks nicer if the block of code to process a particular command, for example, starts with no indentation. The indentation is then restored at the end of the CASE statement. As long as there is an indentation escape mechanism, nesting by indentation seems like a good idea, at least without having tried it. A deliberate indentation adjust statement would be sufficient. Something like UNDENT 5 would tell the compiler that the source code will now be written with 5 nesting levels less although the real nesting level won't change. This would be followed by INDENT 5, or maybe just INDENT, to restore the level. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist