Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




The GNU C Programming Tutorial - A note from the original author

Node:A note from the original author, Next:, Previous:Example programs, Up:Top

A note from the original author

This book began life in 1987 as one of the early books on C programming. I wrote it during a summer vacation from University, in England in 1987. It was published by Dabs Press, a small publishing house which specialized in books for microcomputers, particularly Acorn's classic BBC micro. With the arrival of the Amiga, I was able to obtain a C compiler. I had had my eye on C for some time, and I felt at the time, that it was the best language I had seen to date for system programming. The publisher and I decided that C would become the `BASIC' of the 16-bit microcomputer world, which it did. C took off, and the book sold very well for a number of years. As the contract expired, the book was lost in my files, until I met Richard Stallman and he asked me if I would give the tutorial to GNU. I agreed to recover the original files from diskettes and partly re-work them, to remove the emphasis from micro-computers and over to GNU. The result of that work was the first version of the tutorial. Having handed over the merchandise, I agreed that it would be a good thing for others to update and improve the tutorial. My only requirement was that I would be allowed to explain a few changes for which I would not want to be blamed. I cannot insist that such changes will not be made, but I can at least distance myself from them. They are fairly picky and even silly things, but for one reason or another, they mean a lot to me. The first has to do with grammar. The grammar which is written and printed in books today is often incorrect. Many colloquialisms and vernacular perversions of grammar are printed and believed to be correct. I am fairly sure that no such errors are mine! The other thing has to do with the style and formatting of C code. The placement of curly braces is something about which I agree with only a handful of people on the planet. Kernighan and Ritchie's original placement of curly braces is so horrendous that I would go so far as to call it "wrong", logically and aesthetically. The GNU indentation, which positions braces of the same level in straight vertical alignment, is much better, but in my opinion it gets its indentation wrong. I would indent 3 positions before the first brace, and keep the text within braces aligned with the braces themselves, rather than indenting within the braces, as GNU does. That, in my personal opinion, makes it easier to identify text and braces belonging together, and leads to optimal clarity. I also insist that curly braces be used around single statements, in loops and tests, even when not strictly required by the language. Finally, having grown up in England and lived in Norway, which have contradictory punctuation rules, I am utterly confused about punctuation and have probably made many errors. With that little spiel said, I now pass the torch to future authors and wish everyone luck. I am happy to see an old summer job not go to waste.

Mark Burgess, Oslo March 2001

  Published under free license. Design by Interspire