diff options
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r-- | docs/control-structures.rst | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst index d2ad0936..4ac4b283 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. :: |