From a63f94e0423fb51e10e7d106a50e7dce14ace104 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 17 Aug 2016 11:04:40 +0200 Subject: [PATCH] Fix docs. (#916) --- docs/control-structures.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/control-structures.rst b/docs/control-structures.rst index d2ad09364eb2..4ac4b283f1a6 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -87,7 +87,10 @@ parentheses at the end perform the actual call. Named Calls and Anonymous Function Parameters --------------------------------------------- -Function call arguments can also be given by name, in any order. +Function call arguments can also be given by name, in any order, +if they are enclosed in ``{ }`` as can be seen in the following +example. The argument list has to coincide by name with the list of +parameters from the function declaration, but can be in arbitrary order. :: @@ -99,9 +102,12 @@ Function call arguments can also be given by name, in any order. f({value: 2, key: 3}); } } -Note that when calling the function, the argument list must match by name every parameter from the function declaration - though in an arbitrary order. -Also, the names of unused parameters (especially return parameters) can be omitted. +Omitted Function Parameter Names +-------------------------------- + +The names of unused parameters (especially return parameters) can be omitted. +Those names will still be present on the stack, but they are inaccessible. ::