Main Page

Previous Page
Next Page

[Page 1272]

Appendix F. Preprocessor

Hold thou the good; define it well.

Alfred, Lord Tennyson

I have found you an argument; but I am not obliged to find you an understanding.

Samuel Johnson

A good symbol is the best argument, and is a missionary to persuade thousands.

Ralph Waldo Emerson

Conditions are fundamentally sound.

Herbert Hoover [December 1929]

The partisan, when he is engaged in a dispute, cares nothing about the rights of the question, but is anxious only to convince his hearers of his own assertions.



In this chapter you will learn:

  • To use #include for developing large programs.

  • To use #define to create macros and macros with arguments.

  • To understand conditional compilation.

  • To display error messages during conditional compilation.

  • To use assertions to test if the values of expressions are correct.

[Page 1273]


F.1 Introduction

F.2 The #include Preprocessor Directive

F.3 The #define Preprocessor Directive: Symbolic Constants

F.4 The #define Preprocessor Directive: Macros

F.5 Conditional Compilation

F.6 The #error and #pragma Preprocessor Directives

F.7 The # and ## Operators

F.8 Predefined Symbolic Constants

F.9 Assertions

F.10 Wrap-Up



Self-Review Exercises

Answers to Self-Review Exercises


Previous Page
Next Page