summaryrefslogtreecommitdiff
path: root/reference/C/EXAMPLES/enum4.c
blob: a07a3bf4f7843549d6ec637ff5397c372376cce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/****************************************************************************
 *
 *  Enumeration example: This program will fail to compile because the 
 *  preprocessor will change the FALSE to 1 on the enum statement....
 *
 ****************************************************************************/

#define FALSE 1

main()
{

  enum Boolian_t {FALSE=0, TRUE} Boolian;
    
  printf("False has a value of %d", FALSE);
  printf(" True has a value of %d", TRUE);
}