tut1.rst: Fix alignment, Change Subrange to MySubrange for clarity (#5798)
* tut1.rst: Fix alignment * tut1.rst: Change Subrange to MySubrange for clarity
This commit is contained in:
parent
40e9e751f0
commit
f5717490d9
1 changed files with 5 additions and 5 deletions
|
|
@ -1132,11 +1132,11 @@ A subrange type is a range of values from an integer or enumeration type
|
||||||
|
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
type
|
type
|
||||||
Subrange = range[0..5]
|
MySubrange = range[0..5]
|
||||||
|
|
||||||
|
|
||||||
``Subrange`` is a subrange of ``int`` which can only hold the values 0
|
``MySubrange`` is a subrange of ``int`` which can only hold the values 0
|
||||||
to 5. Assigning any other value to a variable of type ``Subrange`` is a
|
to 5. Assigning any other value to a variable of type ``MySubrange`` is a
|
||||||
compile-time or runtime error. Assignments from the base type to one of its
|
compile-time or runtime error. Assignments from the base type to one of its
|
||||||
subrange types (and vice versa) are allowed.
|
subrange types (and vice versa) are allowed.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue