Content deleted Content added
m Reverted 1 edit by Indian reader (talk) to last revision by TucanHolmes (TW) |
m linking |
||
Line 114:
</syntaxhighlight>
Use of blocks in the above fragment of [[Pascal (programming language)|Pascal]] clarifies the programmer's intent, and enables combining the resulting blocks into a nested hierarchy of [[Conditional (computer programming)|conditional]] statements. The structure of the code reflects the programmer's thinking more closely, making it easier to understand and modify.
The above source code can be made even clearer by taking the inner if statement out of the outer one altogether, placing the two blocks one after the other to be executed consecutively. Semantically there is little difference in this case, and the use of block structure, supported by indenting for readability, makes it easy for the programmer to refactor the code.
|