datatypes & comments example

Filed under: Programming in C, Tutorials — by Ron on July 18, 2005 @ 9:49 am

In this code sample, I’ve placed lots of comments. To see how well I’ve done at commenting, I’ll leave it to you to ask any questions in the forums. (Continue reading…)

datatypes

Filed under: Programming in C, Tutorials — by Ron on July 16, 2005 @ 9:44 am

In the The Traditional First Program I talked about the main() function returning an integer to the operating system. int is a datatype. In C, there are a few basic datatypes. Before I talk about those, I’ll explain a bit about computers and memory.
(Continue reading…)

Comments

Filed under: Programming in C, Tutorials — by Ron on July 12, 2005 @ 9:44 am

Every programming language I’ve worked with allowed the programmer to add comments to the program. Comments are essentially programmer notes which the compiler ignores. In the small programs I’ve had here so far comments haven’t really been necessary. However, when you have a program that has 10,000 lines of code and you haven’t looked at it in a couple years, comments come in handy. A second instance where comments are handy is when you are trying to make changes to programs someone else wrote. I’ve modified programs written by other people. Some were well commented, others not. If I had not already been convinced of the value of comments, working with those poorly commented programs would have changed my mind. (Continue reading…)

Escape Codes

Filed under: Programming in C, Tutorials — by Ron on July 3, 2005 @ 6:03 pm

To explain the reason for a number of the escape codes in this tutorial, I’m going to describe a bit more of the history of the C Language. At the time C was being developed, the computer industry was in the transition from using punch cards for input to hardcopy terminals. A hardcopy terminal was essentially a printer with a keyboard. It can with an attached stand and they were about desk height. You could sit at one in your office chair and type away. The last time I used a hardcopy terminal was 1994. (Continue reading…)

Powered by WordPress MU Theme by Ron and Andrea.