diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-06-20 16:25:37 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-06-20 16:25:37 +0100 |
commit | e74012b3967476a9bb19073daa4f6d8e061fe60a (patch) | |
tree | 17a56568896d57999ec62ea22f4ea126122f5669 /lib/system.nim | |
parent | ec06ed60378c6a64844279cbe7d5dc53c1e7adae (diff) | |
parent | 1cdbd6b0a5865ba3ecb685c82338df1482aa118b (diff) | |
download | Nim-e74012b3967476a9bb19073daa4f6d8e061fe60a.tar.gz |
Merge pull request #2961 from Perelandric/rename_writeLn
Renamed writeln to writeLine. Issue #2958
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim index 2beb5b88d..34531eb46 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -898,7 +898,7 @@ proc contains*[T](x: set[T], y: T): bool {.magic: "InSet", noSideEffect.} ## ## .. code-block:: Nim ## var s: set[range['a'..'z']] = {'a'..'c'} - ## writeln(stdout, 'b' in s) + ## writeLine(stdout, 'b' in s) ## ## If ``in`` had been declared as ``[T](elem: T, s: set[T])`` then ``T`` would ## have been bound to ``char``. But ``s`` is not compatible to type @@ -2269,7 +2269,7 @@ proc echo*(x: varargs[expr, `$`]) {.magic: "Echo", tags: [WriteIOEffect], ## Special built-in that takes a variable number of arguments. Each argument ## is converted to a string via ``$``, so it works for user-defined ## types that have an overloaded ``$`` operator. - ## It is roughly equivalent to ``writeln(stdout, x); flushFile(stdout)``, but + ## It is roughly equivalent to ``writeLine(stdout, x); flushFile(stdout)``, but ## available for the JavaScript target too. ## ## Unlike other IO operations this is guaranteed to be thread-safe as @@ -2526,7 +2526,11 @@ when not defined(JS): #and not defined(NimrodVM): ## Returns ``false`` if the end of the file has been reached, ``true`` ## otherwise. If ``false`` is returned `line` contains no new data. - proc writeln*[Ty](f: File, x: varargs[Ty, `$`]) {.inline, + proc writeLn*[Ty](f: File, x: varargs[Ty, `$`]) {.inline, + tags: [WriteIOEffect], benign, deprecated.} + ## **Deprecated since version 0.11.4:** Use **writeLine** instead. + + proc writeLine*[Ty](f: File, x: varargs[Ty, `$`]) {.inline, tags: [WriteIOEffect], benign.} ## writes the values `x` to `f` and then writes "\n". ## May throw an IO exception. |