summaryrefslogtreecommitdiff
path: root/reference/C/EXAMPLES/if_else_endif.c
blob: 308d92976eaa411eaf3775fa29c7a45b06a4af73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Purpose: Demonstrate #if, #else & #endif preprocessors.
 * Author:  M J Leslie    
 * Date:    28-Jun-94
 */

#define SWITCH 0

			/* The #if can only perform 
			 * INTEGER tests!!!!
			 */
#if  ( SWITCH == 1 )
   #define TEXT "Carabanger\n"
#else
   #define TEXT "Hip Dude\n"
#endif

main ()
{
  printf(TEXT);
}