C - Elements of Style |
|||
|
ISBN : 1558512918 |
|||
![]() Cover Design - C - Elements of Style |
For your free electronic copy of this book please verify the numbers below. (We need to do this to make sure you're a person and not a malicious script) | ||
|
Sample Chapter From C - Elements of Style Copyright © Steve Oualline |
|||
Program AestheticsA properly designed program is easy to read and understand. Part of what makes books readable is good paragraphing. Books are broken up into paragraphs and sentences. A sentence forms one complete thought, and multiple sentences on a single subject form a paragraph. Code paragraphsSimilarly, a C program consists of statements, and multiple statements on the same subject form a conceptual block. Since "conceptual block" is not a recognized technical term, you may just as well call them paragraphs. In this book, paragraphs are separated from each other by a blank line. You can separate paragraphs in C in the same way.Omitting paragraphs in code creates ugly, hard-to-read programs. If you've ever tried reading a paper without paragraphing, you realize how easy it is to get lost. Paragraph-less programming tends to cause the program to get lost:
/* Poor programming style */
|
|||