diff options
author | Araq <rumpf_a@web.de> | 2012-02-13 00:23:11 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-02-13 00:23:11 +0100 |
commit | 88f9eff38fc8b462df474e2e3a9404527d29f30a (patch) | |
tree | d919fdcabd218d3761b682809c48f6646469c13a | |
parent | 73553308f8741e06fb0d6006652c960c21e1fc70 (diff) | |
download | Nim-88f9eff38fc8b462df474e2e3a9404527d29f30a.tar.gz |
documentation improvements
-rwxr-xr-x | doc/manual.txt | 7 | ||||
-rwxr-xr-x | doc/tut1.txt | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/doc/manual.txt b/doc/manual.txt index b28aa28cc..9627e18c7 100755 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -730,7 +730,8 @@ to ``cstring`` for convenience. If a Nimrod string is passed to a C-style variadic proc, it is implicitely converted to ``cstring`` too: .. code-block:: nimrod - proc printf(formatstr: cstring) {.importc: "printf", varargs.} + proc printf(formatstr: cstring) {.importc: "printf", varargs, + header: "<stdio.h>".} printf("This works %s", "as expected") @@ -2054,6 +2055,7 @@ Type casts ~~~~~~~~~~ Example: + .. code-block:: nimrod cast[int](x) @@ -2555,6 +2557,7 @@ type class matches ================== =================================================== ``object`` any object type ``tuple`` any tuple type + ``enum`` any enumeration ``proc`` any proc type ``ref`` any ``ref`` type @@ -3467,7 +3470,7 @@ A global variable can be marked with the `threadvar`:idx: pragma; it is a `thead-local`:idx: variable then: .. code-block:: nimrod - var checkpoints* {.thread.}: seq[string] = @[] + var checkpoints* {.threadvar.}: seq[string] = @[] Actor model diff --git a/doc/tut1.txt b/doc/tut1.txt index 1b0b2cd10..bbc4e1ee6 100755 --- a/doc/tut1.txt +++ b/doc/tut1.txt @@ -831,7 +831,7 @@ terminating zero is no error and often leads to simpler code: ... The assignment operator for strings copies the string. You can use the ``&`` -operator to concatenate strings. +operator to concatenate strings and ``add`` to append to a string. Strings are compared by their lexicographical order. All comparison operators are available. Per convention, all strings are UTF-8 strings, but this is not |