summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-11-22 22:54:24 +0100
committerGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-11-22 22:54:24 +0100
commit936c71df70c0ec2c3c9a2373a57e5a6c835a01e0 (patch)
tree453b2c54af59178d9df872b663ba1d28aaf07bfd
parente469bdb6faae28514388cc4190c04373eb4b8dea (diff)
downloadNim-936c71df70c0ec2c3c9a2373a57e5a6c835a01e0.tar.gz
Clarifies wording of newSeq proc docstrings.
-rw-r--r--lib/system.nim16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/system.nim b/lib/system.nim
index b2d19a885..7917f7d5b 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -374,10 +374,10 @@ proc newSeq*[T](s: var seq[T], len: int) {.magic: "NewSeq", noSideEffect.}
   ## This is equivalent to ``s = @[]; setlen(s, len)``, but more
   ## efficient since no reallocation is needed.
   ##
-  ## Note that the sequence will be filled with uninitialized entries, which
-  ## can be a problem for sequences containing strings. After the creation of
-  ## the sequence you should assign entries to the sequence instead of adding
-  ## them. Example:
+  ## Note that the sequence will be filled with zeroed entries, which can be a
+  ## problem for sequences containing strings since their value will be
+  ## ``nil``. After the creation of the sequence you should assign entries to
+  ## the sequence instead of adding them. Example:
   ##
   ## .. code-block:: nimrod
   ##   var inputStrings : seq[string]
@@ -390,10 +390,10 @@ proc newSeq*[T](s: var seq[T], len: int) {.magic: "NewSeq", noSideEffect.}
 proc newSeq*[T](len = 0): seq[T] =
   ## creates a new sequence of type ``seq[T]`` with length ``len``.
   ##
-  ## Note that the sequence will be filled with uninitialized entries, which
-  ## can be a problem for sequences containing strings. After the creation of
-  ## the sequence you should assign entries to the sequence instead of adding
-  ## them. Example:
+  ## Note that the sequence will be filled with zeroed entries, which can be a
+  ## problem for sequences containing strings since their value will be
+  ## ``nil``. After the creation of the sequence you should assign entries to
+  ## the sequence instead of adding them. Example:
   ##
   ## .. code-block:: nimrod
   ##   var inputStrings = newSeq[string](3)