Re: [PIC] Learning C
RussellMc <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.pic |
|---|---|
| Message-ID | <CACZQxzMRQnC1M6EY=YjFmx6hfzm8qguA+6tG9mzwXxYrNgVVjg@mail.gmail.com> |
David C Brown, <[email protected]> wrote > > Onew of the problems I have with trying to understand code examples in C is > that so many of them are incomprehensibly dense. > When writing C++ code I formatted in a way which to me makes it far more > readable than the normal manner of presentation. I place { on the line following and then indent code following an Indian it again for any other functions such as if / while / case ... . The end result is code who's structure leaps out and grabs you. I started off being somewhat surprised that this wasn't standard practice come to accept that most people prefer density and obfuscation. Apart from taking more space I can see no disadvantages and this approach and for me the gains are substantial. I spent many decades working mainly in assembler and actually find it generally easier to see what's going on than in most higher level languages. Russell.