padding:0; background:#fff; color:#000}td,body,.form {font-family:Tahoma; letter-spacing:1.1lm;font-size: 9pt}A {color:#336699; text-decoration: none;}I guess there are at least as many coding styles as there are programmers times programming languages. Many of us are conformists, and some of us have our highly personal style, but most of us probably fail at being 100% consistant. Code formatting can probably be considered a slightly religious area, so please feel free to disagree with me :)So - why bother to put any effort into the formatting anyways? It is not like the compiler care? I mean, apart from the obvious requirement that things should be reasonable readable and not just a jumble of code? Layout matters. It is significantly easier to pick up code that is consistant in style than wading through spaghetti (or gnocchi) code where the indentation has not been considered much.I have noticed that my personal style with regards to block formatting definitively is non-conformist. Whenever there is a do, if/then/else, with or without related begin/end, I will probably annoy the heck out of the conformists. My formatting goals:• I want clear indication of flow• I want to separate conditions from actions • I want room to comment In the examples below, I will place comments in the individualist examples to give an indication of why I choose to wrap/indent in this way rather than the "global standard"Let's start with the do in with and the for-loop (I do at times, albeit rarely, confess to the occasional use of with).// Conformist for i := 1 to 5 do Something; for i := 1 to 5 do begin Something; SomethingMore; end; with SomeObject do begin Something; SomethingMore; end; // Individualist for i := 1 to 5 // For selected range do Something(i); // get stuff done for i := 0 to (count - 1) // For every item do begin Something(i); // Step 1 SomethingMore(i); // Step 2 end; with SomeObject // Focusing on this specific item, do begin // I can add this comment for clarity Something; SomethingMore; end;The if/then/else statement have too many combinations to even get close to cover them all, so I am only going to do a handful.// Conformist if (SomeVariable = Condition) and (SomeOtherExpression) then PerformSomeRoutine; if (SomeVariable = Condition) and (SomeOtherExpression) then begin Code; MoreCode; LotsOfCode; end else OtherCode; if Condition then DoFirstAlternative else DoSecondAlternative; if FirstCondition then DoFirstAlternative else if SecondCondition then DoSecondAlternative else DoThirdAlternative; // Individualist if (SomeVariable = Condition) // I always put the condition alone then PerformSomeRoutine; if (SomeVariable = Condition) // Condition X found and (SomeOtherExpression) // Requirement Y fulfulled then begin // we can do our stuff Code; MoreCode; LotsOfCode; end else OtherCode; // or we ended up with the alternative if Condition then DoFirstAlternative // The Condition compelled us to do this else DoSecondAlternative; // Optionally, we explain the alternative // Here I find myself doing many different approaches, // depending on the complexity of the logic, and the number // of alternatives, but with multiple nested if's, I tend to indent if FirstCondition then DoFirstAlternative // We are doing 1 because ... else