2.4. Advanced Procedure Macro Programming

Felix procedure macros also contain rudimentary control structures: you can encode labels, unconditional jumps, conditional jumps, and returns. Note the conditional goto requires the condition resolve to a constant expression. Of course, the value can change with time, since it can depend on macro variables.
Start C++ section to tut/examples/mac126a.flx[1 /1 ]
     1: include "std";
     2: macro proc print_alot ()
     3: {
     4:   macro var count = 10;
     5:   macro start:>
     6:     print count; print " ";
     7:     macro count = count - 1;
     8:     macro if count > 0 goto start;
     9:   endl;
    10: }
    11: 
    12: print_alot();
    13: 
End C++ section to tut/examples/mac126a.flx[1]