summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-03 11:51:15 +0200
committerAraq <rumpf_a@web.de>2018-09-03 11:51:15 +0200
commit4b823b2825beb9732fbd70109ae77a229cfe54f2 (patch)
treebb266677c4bcccf44cb8f701f963d3dea2175963
parent602aeef4d4d70b9fe8c6a1e318538697b3e23bfc (diff)
downloadNim-4b823b2825beb9732fbd70109ae77a229cfe54f2.tar.gz
manual: more documentation for the 'using' statement; closes #8565
-rw-r--r--doc/manual.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/manual.rst b/doc/manual.rst
index e3199cecf..7a765ef63 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -17,8 +17,7 @@ About this document
 ===================
 
 **Note**: This document is a draft! Several of Nim's features may need more
-precise wording. This manual is constantly evolving until the 1.0 release and is
-not to be considered as the final proper specification.
+precise wording. This manual is constantly evolving into a proper specification.
 
 This document describes the lexis, the syntax, and the semantics of Nim.
 
@@ -2985,6 +2984,10 @@ name ``c`` should default to type ``Context``, ``n`` should default to
   proc bar(c, n, counter) = ...
   proc baz(c, n) = ...
 
+  proc mixedMode(c, n; x, y: int) =
+    # 'c' is inferred to be of the type 'Context'
+    # 'n' is inferred to be of the type 'Node'
+    # But 'x' and 'y' are of type 'int'.
 
 The ``using`` section uses the same indentation based grouping syntax as
 a ``var`` or ``let`` section.
@@ -2992,6 +2995,9 @@ a ``var`` or ``let`` section.
 Note that ``using`` is not applied for ``template`` since untyped template
 parameters default to the type ``system.untyped``.
 
+Mixing parameters that should use the ``using`` declaration with parameters
+that are explicitly typed is possible and requires a semicolon between them.
+
 
 If expression
 -------------