by twm » Sun Oct 12, 2003 1:48 pm
Example:
- Code: Select all
#define DEPOSIT 0
#define WITHDRAW 1
#define CHECKBALANCE 2
#define EXIT 3
#define replaces a string of text with another string of text, it's set up like so:
- Code: Select all
#define STRINGTOREPLACE REPLACEWITH
So in the above example, every occurance of DEPOSIT in your code will be replaced with 0 before the code is compiled. Preprocessing takes place before anything else and makes actual text changes in your source file.
The information given in this message is known to work on FreeBSD 4.8 STABLE.
*The above statement is false if I was too lazy to test it.*
If someone finds a mistake, gleaming error or typo, do me a favor...bite me.