Help for this page

Select Code to Download


  1. or download this
    sub demacro($)
    {
    ...
        }
        return $text;
    }
    
  2. or download this
        macrodef : '#define' /[a-z]\w*/i
            '(' <leftop: /[a-z]+/i ',' /[a-z]+/i> ')'  /.*/
                { $::macro{$item[2]} = [ $item[-1], $item[4] ]; }
             | '#define' /[a-z]\w*/i  /.*/
                { $::macro{$item[2]} = [ $item[-1] ]; }
    
  3. or download this
    #define        add(a,b,c)        (a+b+c)
    #define        mult(d,e)        (d*e)
    ...
        mult(4,5);
        float p = pi;
    }