1.7. Mutators

Felix provides a range of mutators, these being assignment operators and counting operators. Below is a list of operators and equivalent procedure names.
Start C++ section to tut/examples/tut105b.flx[1 /1 ]
     1: include "std";
     2: open Uint;
     3: 
     4: var i:int;
     5: var j:int;
     6: 
     7: var u: uint;
     8: var v: uint;
     9: 
    10: // operator    procedure
    11: i = 1;         // assignment, intrinsic
    12: 
    13: // integral
    14: i +=  1;       pluseq       (i,1);
    15: i -=  1;       minuseq      (i,1);
    16: i *=  1;       muleq        (i,1);
    17: i /=  1;       diveq        (i,1);
    18: 
    19: // bitwise: unsigned only
    20: u ^=  1u;       bxoreq      (u,1u);
    21: u |=  1u;       boreq       (u,1u);
    22: u &=  1u;       bandeq      (u,1u);
    23: 
    24: 
    25: // counting
    26: ++i;           pre_incr (i);
    27: i++;           post_incr (i);
    28: --i;           pre_decr (i);
    29: i--;           post_decr (i);
    30: 
End C++ section to tut/examples/tut105b.flx[1]