diff options
author | Araq <rumpf_a@web.de> | 2011-11-25 15:33:58 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-11-25 15:33:58 +0100 |
commit | 2de98d9e0526ff33bc392152bc615f1abf34ebd0 (patch) | |
tree | 018d93c74f723ba4800f6c76d3bd33737d91bb59 /doc | |
parent | ed9c7761c4e37ec22ebd81acf16e3137d064cfc9 (diff) | |
download | Nim-2de98d9e0526ff33bc392152bc615f1abf34ebd0.tar.gz |
new pragma: 'noinit'
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/manual.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/manual.txt b/doc/manual.txt index 6d8286dd7..c2ae2c757 100755 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -1526,6 +1526,14 @@ T = enum cast[T](0); this may be an invalid value ============================ ============================================== +The implicit initialization can be avoided for optimization reasons with the +`noinit`:idx: pragma: + +.. code-block:: nimrod + var + a {.noInit.}: array [0..1023, char] + + Const section ~~~~~~~~~~~~~ @@ -1781,6 +1789,7 @@ sugar for: result = expr return result + ``return`` without an expression is a short notation for ``return result`` if the proc has a return type. The `result`:idx: variable is always the return value of the procedure. It is automatically declared by the compiler. As all |