Fix typos in system.nim

This commit is contained in:
flaviut 2014-04-08 18:36:03 -04:00
commit a157985e01

View file

@ -302,7 +302,7 @@ type
## value does not fit. ## value does not fit.
EOutOfRange* = object of ESynch ## is raised if a range check error EOutOfRange* = object of ESynch ## is raised if a range check error
## occured. ## occurred.
EStackOverflow* = object of ESystem ## is raised if the hardware stack EStackOverflow* = object of ESystem ## is raised if the hardware stack
## used for subroutine calls overflowed. ## used for subroutine calls overflowed.
@ -993,9 +993,9 @@ const
## failure. ## failure.
var programResult* {.exportc: "nim_program_result".}: int var programResult* {.exportc: "nim_program_result".}: int
## modify this varialbe to specify the exit code of the program ## modify this variable to specify the exit code of the program
## under normal circumstances. When the program is terminated ## under normal circumstances. When the program is terminated
## prematurelly using ``quit``, this value is ignored. ## prematurely using ``quit``, this value is ignored.
proc quit*(errorcode: int = QuitSuccess) {. proc quit*(errorcode: int = QuitSuccess) {.
magic: "Exit", importc: "exit", header: "<stdlib.h>", noReturn.} magic: "Exit", importc: "exit", header: "<stdlib.h>", noReturn.}
@ -1352,42 +1352,42 @@ template `>%` *(x, y: expr): expr {.immediate.} = y <% x
## Returns true iff ``unsigned(x) > unsigned(y)``. ## Returns true iff ``unsigned(x) > unsigned(y)``.
proc `$` *(x: int): string {.magic: "IntToStr", noSideEffect.} proc `$` *(x: int): string {.magic: "IntToStr", noSideEffect.}
## The stingify operator for an integer argument. Returns `x` ## The stringify operator for an integer argument. Returns `x`
## converted to a decimal string. ## converted to a decimal string.
proc `$` *(x: int64): string {.magic: "Int64ToStr", noSideEffect.} proc `$` *(x: int64): string {.magic: "Int64ToStr", noSideEffect.}
## The stingify operator for an integer argument. Returns `x` ## The stringify operator for an integer argument. Returns `x`
## converted to a decimal string. ## converted to a decimal string.
when not defined(NimrodVM): when not defined(NimrodVM):
when not defined(JS) and hostOS != "standalone": when not defined(JS) and hostOS != "standalone":
proc `$` *(x: uint64): string {.noSideEffect.} proc `$` *(x: uint64): string {.noSideEffect.}
## The stingify operator for an unsigned integer argument. Returns `x` ## The stringify operator for an unsigned integer argument. Returns `x`
## converted to a decimal string. ## converted to a decimal string.
proc `$` *(x: float): string {.magic: "FloatToStr", noSideEffect.} proc `$` *(x: float): string {.magic: "FloatToStr", noSideEffect.}
## The stingify operator for a float argument. Returns `x` ## The stringify operator for a float argument. Returns `x`
## converted to a decimal string. ## converted to a decimal string.
proc `$` *(x: bool): string {.magic: "BoolToStr", noSideEffect.} proc `$` *(x: bool): string {.magic: "BoolToStr", noSideEffect.}
## The stingify operator for a boolean argument. Returns `x` ## The stringify operator for a boolean argument. Returns `x`
## converted to the string "false" or "true". ## converted to the string "false" or "true".
proc `$` *(x: char): string {.magic: "CharToStr", noSideEffect.} proc `$` *(x: char): string {.magic: "CharToStr", noSideEffect.}
## The stingify operator for a character argument. Returns `x` ## The stringify operator for a character argument. Returns `x`
## converted to a string. ## converted to a string.
proc `$` *(x: cstring): string {.magic: "CStrToStr", noSideEffect.} proc `$` *(x: cstring): string {.magic: "CStrToStr", noSideEffect.}
## The stingify operator for a CString argument. Returns `x` ## The stringify operator for a CString argument. Returns `x`
## converted to a string. ## converted to a string.
proc `$` *(x: string): string {.magic: "StrToStr", noSideEffect.} proc `$` *(x: string): string {.magic: "StrToStr", noSideEffect.}
## The stingify operator for a string argument. Returns `x` ## The stringify operator for a string argument. Returns `x`
## as it is. This operator is useful for generic code, so ## as it is. This operator is useful for generic code, so
## that ``$expr`` also works if ``expr`` is already a string. ## that ``$expr`` also works if ``expr`` is already a string.
proc `$` *[TEnum: enum](x: TEnum): string {.magic: "EnumToStr", noSideEffect.} proc `$` *[TEnum: enum](x: TEnum): string {.magic: "EnumToStr", noSideEffect.}
## The stingify operator for an enumeration argument. This works for ## The stringify operator for an enumeration argument. This works for
## any enumeration type thanks to compiler magic. If ## any enumeration type thanks to compiler magic. If
## a ``$`` operator for a concrete enumeration is provided, this is ## a ``$`` operator for a concrete enumeration is provided, this is
## used instead. (In other words: *Overwriting* is possible.) ## used instead. (In other words: *Overwriting* is possible.)