#define MYOWN
#define DEBUG
#undef VERBOSE
#define PROGRAMMER_IS_BRIAN
#undef PROGRAMMER_IS_DAVE
using System;
class Preprocessor {
static void Main() {
#if MYOWN
Console.WriteLine("Hi Author!");
#elif VERBOSE
Console.WriteLine("Program Starting?);
#endif
int a = 10, b = 5;
#if DEBUG
Console.WriteLine("a={0}, b={1}", a, b);
#endif
#if MYOWN && (VERBOSE || DEBUG)
Console.WriteLine("Continuing, Author");
#elif !MYOWN && (VERBOSE || DEBUG)
Console.WriteLine("Continuing?);
#endif
#if PROGRAMMER_IS_BRIAN || PROGRAMMER_IS_DAVE
#warning Execution may vary depending on programmer.
#endif
#if PROGRAMMER_IS_DAVE
#error Something you did broke this code.
#endif
}
}
|