home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tools / clear_c / code.h next >
Text File  |  1989-12-07  |  2KB  |  55 lines

  1. /* code.h  - taking C to higher level */
  2. /* Coding Language of "Raw" C language preprocessor transformations */
  3.  
  4.    /* Operator Constructs */
  5.  
  6.       /* Logical Operators */
  7.       # define   AND   &&
  8.       # define   OR    ||
  9.       # define   NOT   !
  10.  
  11.  
  12.       /* Bitwise operators */
  13.       # define   BAND  &             /* Bitwise AND */
  14.       # define   BOR   |
  15.       # define   BXOR  ^
  16.       # define   BNOT  ~
  17.       # define   LSHF  <<
  18.       # define   RSHF  >>
  19.  
  20.    /* Control Constructs (block implicit) */
  21.  
  22.       /* IF ___ ELSE ___ ENDIF construct */
  23.       # define   IF(c)        if(c) {
  24.       # define   ELSE         ;} else {
  25.       # define   ENDIF        ;}
  26.       # define   ELSEIF(c)    ;} else if(c) {
  27.  
  28.       /* CASE construct */
  29.       # define   CASE(c)      switch(c) {
  30.       # define   CASEOF(c)    case c : {
  31.       # define   DEFCASE      default : {
  32.       # define   ENDCOF       } break;
  33.       # define   ENDCASE      }
  34.  
  35.       /* WHILE(c) ___ ENDW construct */
  36.       # define   WHILE(c)     while(c) {
  37.       # define   ENDW         ;}
  38.  
  39.       /* FOR(c) ___ ENDF construct */
  40.       # define   FOR(c)       for(c) {
  41.       # define   ENDF         ;}
  42.  
  43.       /* FOREVER ___ ENDFR */
  44.       # define   FOREVER      while (1) {
  45.       # define   ENDFR        ;}
  46.  
  47.       /* REPEAT ___ UNTIL(c) */
  48.       # define   REPEAT       do {
  49.       # define   UNTIL(c)     } while(!(c));
  50.  
  51.       /* BEGIN ___ END  General block */
  52.       # define   BEGIN   {
  53.       # define   END     }
  54.  
  55.