Modula-3: Inc and Dec statements

# Inc and Dec

`INC` and `DEC` statements have the form:

        INC(v, n)
        DEC(v, n)

where `v` designates a variable of an ordinal type and `n` is an optional integer-valued argument. If omitted, `n` defaults to 1. The statements increment and decrement `v` by `n`, respectively. The statements are equivalent to:

        WITH x = v DO x := VAL(ORD(x) + n, T) END
        WITH x = v DO x := VAL(ORD(x) - n, T) END

where `T` is the type of `v` and `x` stands for a variable that does not appear in `n`. As a consequence, the statements check for range errors.

In unsafe modules, `INC` and `DEC` are extended to `ADDRESS`.

    Last modified on Wed Apr  3 09:39:05 PST 1996 by heydon
         modified on Mon Apr 18 14:03:44 PDT 1994 by kalsow