Documentation renames

This commit is contained in:
def 2015-01-16 00:22:49 +01:00
commit 110c4aca7f
8 changed files with 80 additions and 80 deletions

View file

@ -1350,11 +1350,11 @@ integer.
.. code-block:: nim
type
TPerson = tuple[name: string, age: int] # type representing a person:
# a person consists of a name
# and an age
Person = tuple[name: string, age: int] # type representing a person:
# a person consists of a name
# and an age
var
person: TPerson
person: Person
person = (name: "Peter", age: 30)
# the same, but less readable:
person = ("Peter", 30)
@ -1373,7 +1373,7 @@ integer.
# The following line does not compile, they are different tuples!
#person = building
# --> Error: type mismatch: got (tuple[street: string, number: int])
# but expected 'TPerson'
# but expected 'Person'
# The following works because the field names and types are the same.
var teacher: tuple[name: string, age: int] = ("Mark", 42)