1.2.37. test/regress/rt-1.01.37

Start felix section to test/regress/rt-1.01.37-0.flx[1 /1 ]
     1: #line 1420 "./lpsrc/flx_regress.pak"
     2: //Check generators
     3: #import <flx.flxh>
     4: 
     5: gen f(init:int)(inc:int):int = {
     6:   var counter = init;
     7: again:>
     8:   counter += inc;
     9:   yield counter;
    10:   yield counter+1;
    11:   goto again;
    12: }
    13: 
    14: var x = f(40);
    15: print$ x(2); endl; // 42
    16: print$ x(999); endl; // 43
    17: print$ x(2); endl; // 44
    18: print$ x(999); endl; // 45
    19: print$ x(10); endl; // 54
    20: print$ x(999); endl; // 55
    21: print$ x(10); endl; // 64
End felix section to test/regress/rt-1.01.37-0.flx[1]
Start data section to test/regress/rt-1.01.37-0.expect[1 /1 ]
     1: 42
     2: 43
     3: 44
     4: 45
     5: 54
     6: 55
     7: 64
End data section to test/regress/rt-1.01.37-0.expect[1]