Merge pull request #2452 from apense/patch-1

Update system.nim
This commit is contained in:
Andreas Rumpf 2015-04-05 10:48:49 +02:00
commit d1ca5e4067

View file

@ -704,6 +704,7 @@ proc `div` *(x, y: int32): int32 {.magic: "DivI", noSideEffect.}
proc `div` *(x, y: int64): int64 {.magic: "DivI64", noSideEffect.} proc `div` *(x, y: int64): int64 {.magic: "DivI64", noSideEffect.}
## computes the integer division. This is roughly the same as ## computes the integer division. This is roughly the same as
## ``floor(x/y)``. ## ``floor(x/y)``.
##
## .. code-block:: Nim ## .. code-block:: Nim
## 1 div 2 == 0 ## 1 div 2 == 0
## 2 div 2 == 1 ## 2 div 2 == 1
@ -723,6 +724,7 @@ proc `shr` *(x, y: int16): int16 {.magic: "ShrI", noSideEffect.}
proc `shr` *(x, y: int32): int32 {.magic: "ShrI", noSideEffect.} proc `shr` *(x, y: int32): int32 {.magic: "ShrI", noSideEffect.}
proc `shr` *(x, y: int64): int64 {.magic: "ShrI64", noSideEffect.} proc `shr` *(x, y: int64): int64 {.magic: "ShrI64", noSideEffect.}
## computes the `shift right` operation of `x` and `y`. ## computes the `shift right` operation of `x` and `y`.
##
## .. code-block:: Nim ## .. code-block:: Nim
## 0b0001_0000'i8 shr 2 == 0b0100_0000'i8 ## 0b0001_0000'i8 shr 2 == 0b0100_0000'i8
## 0b1000_0000'i8 shr 2 == 0b0000_0000'i8 ## 0b1000_0000'i8 shr 2 == 0b0000_0000'i8