1.9.1. Preconditions and Postconditions

Procedures may also have pre and post conditions.
Start C++ section to tut/examples/tut112a.flx[1 /1 ]
     1: include "std";
     2: var x = 7;
     3: var y = x;
     4: 
     5: proc decr(d:int when d>=0) expect x==y-d = {
     6:   y = x;
     7:   x -= d;
     8: }
     9: 
    10: decr 2;
    11: print x; endl;
    12: 
End C++ section to tut/examples/tut112a.flx[1]