CheckVariableExists.c 382 B

123456789101112131415161718192021222324
  1. #ifdef CHECK_VARIABLE_EXISTS
  2. extern int CHECK_VARIABLE_EXISTS;
  3. # ifdef __CLASSIC_C__
  4. int main()
  5. {
  6. int ac;
  7. char* av[];
  8. # else
  9. int main(int ac, char* av[])
  10. {
  11. # endif
  12. if (ac > 1000) {
  13. return *av[0];
  14. }
  15. return CHECK_VARIABLE_EXISTS;
  16. }
  17. #else /* CHECK_VARIABLE_EXISTS */
  18. # error "CHECK_VARIABLE_EXISTS has to specify the variable"
  19. #endif /* CHECK_VARIABLE_EXISTS */