summary refs log tree commit diff stats
path: root/doc/manual.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual.rst')
-rw-r--r--doc/manual.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/manual.rst b/doc/manual.rst
index 1371dba17..001402036 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -3603,9 +3603,17 @@ does not provide a value for the argument. The value will be reevaluated
 every time the function is called.
 
 .. code-block:: nim
-  # b is optional with 47 as its default value
+  # b is optional with 47 as its default value.
   proc foo(a: int, b: int = 47): int
 
+Just as the comma propagates the types from right to left until the
+first parameter or until a semicolon is hit, it also propagates the
+default value starting from the parameter declared with it.
+
+.. code-block:: nim
+  # Both a and b are optional with 47 as their default values.
+  proc foo(a, b: int = 47): int
+
 Parameters can be declared mutable and so allow the proc to modify those
 arguments, by using the type modifier `var`.