home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1988 / 03 / c_abc / macros.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-01-20  |  681 b   |  26 lines

  1. /*-------------------------------------------------------*/
  2. /*              Einige nützliche Macros fuer             */
  3. /*               den Umgang mit C-Compilern              */
  4. /*              Ein Beispiel zum C-ABC Teil 3            */
  5. /*                     PASCAL 3/88                       */
  6. /*-------------------------------------------------------*/
  7.  
  8. #define sqr(a) (a)*(a)  /* quadrieren */
  9.  
  10. #define abs(a) ((a) < 0) ? (-(a)) : (a)  /* Betrag */
  11.  
  12. /* nützliche defines für Pascal-Programmierer */
  13.  
  14. #define not(a) !(a)   /* logische Negierung */
  15.  
  16. #define then
  17.  
  18. #define begin {
  19.  
  20. #define end ;}
  21.  
  22. #define repeat do{
  23.  
  24. #define until(a) }while(!(a));
  25.  
  26.