mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 02:42:05 +00:00
fixed wrong examples
This commit is contained in:
@@ -728,7 +728,7 @@ proc ord*[T](x: T): int {.magic: "Ord", noSideEffect.}
|
||||
## returns the internal int value of an ordinal value ``x``.
|
||||
##
|
||||
## .. code-block:: nim
|
||||
## card('A') #=> 65
|
||||
## ord('A') #=> 65
|
||||
|
||||
proc chr*(u: range[0..255]): char {.magic: "Chr", noSideEffect.}
|
||||
## converts an int in the range 0..255 to a character.
|
||||
@@ -1371,7 +1371,7 @@ proc delete*[T](x: var seq[T], i: Natural) {.noSideEffect.} =
|
||||
##
|
||||
## .. code-block:: nim
|
||||
## var i = @[1,2,3,4,5]
|
||||
## i.del(2) #=> @[1, 2, 4, 5]
|
||||
## i.delete(2) #=> @[1, 2, 4, 5]
|
||||
template defaultImpl =
|
||||
let xl = x.len
|
||||
for j in i..xl-2: shallowCopy(x[j], x[j+1])
|
||||
|
||||
Reference in New Issue
Block a user