// This "almost" works but we can't use the preprocessor's arithmetic. // We'd have to define our own. Also there's no equivalent of a MOV, // where you can use the value of one macro to define another, which // makes it tricky to define your own arithmetic; you have to do it all // with conditionals. #ifndef BOTTLES #define BOTTLES 99 #include "beer.h" #else #if BOTTLES == 0 No more bottles of beer on the wall, No more bottles of beer! Can't take one down, or pass it around, Because there are no bottles of beer on the wall! #else #if BOTTLES == 1 One more bottle of beer on the wall, One more bottle of beer! Take it down, pass it around, Now there's no bottles of beer on the wall! #define BOTTLES 0 #include "beer.h" #else BOTTLES bottles of beer on the wall, BOTTLES bottles of beer! Take one down, pass it around, #define BOTTLES BOTTLES-1 BOTTLES of beer on the wall! #include "beer.h" #endif #endif #endif