call.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* Copyright (C) 2016 Jeremiah Orians
  2. * This file is part of M2-Planet.
  3. *
  4. * M2-Planet is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * M2-Planet is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include<stdlib.h>
  18. #include<stdio.h>
  19. #define TRUE 1
  20. #define FALSE 0
  21. // CONSTANT TRUE 1
  22. // CONSTANT FALSE 0
  23. int foo(int a)
  24. {
  25. if(!a)
  26. {
  27. putchar(72);
  28. putchar(101);
  29. putchar(108);
  30. putchar(108);
  31. putchar(111);
  32. putchar(32);
  33. return TRUE;
  34. }
  35. return FALSE;
  36. }
  37. int main()
  38. {
  39. if(foo(FALSE))
  40. {
  41. putchar(109);
  42. putchar(101);
  43. putchar(115);
  44. putchar(10);
  45. }
  46. else
  47. {
  48. exit(2);
  49. }
  50. if(foo(TRUE))
  51. {
  52. exit(3);
  53. }
  54. if(2 > -1)
  55. {
  56. exit(42);
  57. }
  58. return 1;
  59. }