term rewriting macros fully implemented; still buggy
This commit is contained in:
parent
b56df72a32
commit
af7c92c003
22 changed files with 676 additions and 138 deletions
|
|
@ -621,14 +621,14 @@ determined). Assignments from the base type to one of its subrange types
|
|||
A subrange type has the same size as its base type (``int`` in the example).
|
||||
|
||||
Nimrod requires `interval arithmetic`:idx: for subrange types over a set
|
||||
of built-in operators that involve constants: ``x mod 3`` is of
|
||||
of built-in operators that involve constants: ``x %% 3`` is of
|
||||
type ``range[0..2]``. The following built-in operators for integers are
|
||||
affected by this rule: ``-``, ``+``, ``*``, ``min``, ``max``, ``succ``,
|
||||
``pred``, ``mod``, ``div``, ``and`` (bitwise ``and``).
|
||||
``pred``, ``mod``, ``div``, ``%%``, ``and`` (bitwise ``and``).
|
||||
|
||||
Bitwise ``and`` only produces a ``range`` if one of its operands is a
|
||||
constant *x* so that (x+1) is a number of two.
|
||||
(Bitwise ``and`` is then a ``mod`` operation.)
|
||||
(Bitwise ``and`` is then a ``%%`` operation.)
|
||||
|
||||
This means that the following code is accepted:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue