Personally, I prefer the first, because IMHO "end"; don't tell me a lot, and as soon as everything is close, I can tell by identifier what happens when.
I believe that blocks are more useful when there are large operators. You can do a mixed approach where you insert a few "begin ... end;" s and comment on what they end up (for example, use it for with and first if).
IMHO you can also break it down into other methods, for example, part
if not(RecordExists(currRow)) then begin InsertNewRecord(currRow); end //if it didn't exist, so insert it else begin UpdateExistingRecord(currRow); end; //else it existed, so update it
may be in a separate method.
Samuel carrijo
source share