CSC161 2010F Imperative Problem Solving

Class 29: Macros

Back to More Debugging with DDD. On to Make, Revisited.

This outline is also available in PDF.

Held: Friday, 15 October 2010

Summary: We consider ways in which to use the C preprocessor, particularly in the use of macros.

Related Pages:

Notes:

Overview:

Basics

Your Questions

When making #include statements with quotation marks, if the mentioned file isn't found in the working directory, will the compiler look for it in the same directory as the standard C libraries? I felt like the reading implied this but I wanted to be sure.
If it's not in the working directory, then the C compiler will issue an error.
What are are the arcane rules for nested uses of ##?
I don't think there are any. Concatenation can happen left-to-right or right-to-left.

Lab

Back to More Debugging with DDD. On to Make, Revisited.

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Wed Dec 8 10:57:10 2010.
The source to the document was last modified on Fri Aug 27 07:12:23 2010.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC161/2010F/Outlines/outline.29.html.

Samuel A. Rebelsky, rebelsky@grinnell.edu