CheckVariableExists.c 374 Bytes
Newer Older
1 2 3 4
#ifdef CHECK_VARIABLE_EXISTS

extern int CHECK_VARIABLE_EXISTS;

5
#ifdef __CLASSIC_C__
6 7
int main()
{
8
  int ac;
9
  char* av[];
10
#else
11 12
int main(int ac, char* av[])
{
13
#endif
14 15 16
  if (ac > 1000) {
    return *av[0];
  }
17
  return CHECK_VARIABLE_EXISTS;
18 19
}

20
#else /* CHECK_VARIABLE_EXISTS */
21

22
#error "CHECK_VARIABLE_EXISTS has to specify the variable"
23 24

#endif /* CHECK_VARIABLE_EXISTS */