1.9.1. Preconditions and Postconditions

Procedures may also have pre and post conditions.
Start felix section to tut/examples/tut_beg112a.flx[1 /1 ]
     1: #line 375 "./lpsrc/flx_tutorial.pak"
     2: #import <flx.flxh>
     3: var x = 7;
     4: var y = x;
     5: 
     6: proc decr(d:int when d>=0) expect x==y-d = {
     7:   y = x;
     8:   x -= d;
     9: }
    10: 
    11: decr 2;
    12: print x; endl;
    13: 
End felix section to tut/examples/tut_beg112a.flx[1]