summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-09-15 16:08:16 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-09-15 16:08:16 +0200
commit053b0ad6f301ade2d3627abed66a6f48a72aa05b (patch)
tree7236547fae29334c14693e9f2b0df758875c6c5b /doc
parent9aeb78e2a86a6a7ab2c4726e634a8fdc7aa91089 (diff)
parent50ae228e255c0f82a1620657521a27f6b8152b58 (diff)
downloadNim-053b0ad6f301ade2d3627abed66a6f48a72aa05b.tar.gz
Merge branch 'araq' of github.com:nim-lang/Nim into araq
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/types.txt20
1 files changed, 0 insertions, 20 deletions
diff --git a/doc/manual/types.txt b/doc/manual/types.txt
index e6875f2df..927cda9e1 100644
--- a/doc/manual/types.txt
+++ b/doc/manual/types.txt
@@ -136,26 +136,6 @@ 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).
 
-Nim requires `interval arithmetic`:idx: for subrange types over a set
-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``).
-
-Bitwise ``and`` only produces a ``range`` if one of its operands is a
-constant *x* so that (x+1) is a power of two.
-(Bitwise ``and`` is then a ``%%`` operation.)
-
-This means that the following code is accepted:
-
-.. code-block:: nim
-  case (x and 3) + 7
-  of 7: echo "A"
-  of 8: echo "B"
-  of 9: echo "C"
-  of 10: echo "D"
-  # note: no ``else`` required as (x and 3) + 7 has the type: range[7..10]
-
 
 Pre-defined floating point types
 --------------------------------