new pragma: 'noinit'
This commit is contained in:
parent
ed9c7761c4
commit
2de98d9e05
6 changed files with 34 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue