Fixed links and language indentifier in a code block.

This commit is contained in:
konqoro 2016-09-07 21:12:47 +03:00
parent 1817383ce5
commit d4f1cc8ee8
1 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ In Nim, arrays are much more strict. They are pass-by-value (meaning they're cop
**Nim:**
```Nimrod
``` Nim
proc foobar(z: array[0..3, int]) =
z[5] = 5 # Error: Cannot assign to z
echo z[5] # Error: Index out of bounds.
@ -90,7 +90,7 @@ It is possible to implement object-orientation features through libraries, thank
Python-like object orientation example:
```Nim
``` Nim
type Animal = ref object of RootObj
age: int
name: string
@ -153,7 +153,7 @@ echo a[0..1] # returns "he": ranges are inclusive! See the "Ranges" paragraph
### Python tuples
Nim Tuples are close to Python nametuples, see [manual](http://nim-lang.org/docs/manual.html#tuples-and-object-types).
Nim Tuples are close to Python nametuples, see [manual](http://nim-lang.org/docs/manual.html#types-tuples-and-object-types).
Use Nim arrays:
``` Nim
var a = ["hi", "there"]
@ -164,7 +164,7 @@ var c = ["hi", 1] # no mixed types please
### Python lists
Use [Nim sequences](http://nim-lang.org/docs/tut1.html#sequences)
Use [Nim sequences](http://nim-lang.org/docs/tut1.html#advanced-types-sequences)
Nim arrays and sequences can hold only items of the same type.