aboutsummaryrefslogtreecommitdiffstats
path: root/docs/control-structures.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-08-16 22:24:04 +0800
committerGitHub <noreply@github.com>2016-08-16 22:24:04 +0800
commitdbc95570cb4ac53688ebf07c2e5fdbce1ef8089d (patch)
treeaa2e3087be67643bc6d30952b644616b92d06774 /docs/control-structures.rst
parent480cf384bbe923bdb3c5e1a16fb4670a2db6c03c (diff)
parentb2d6097653477056687eb7bcc2d1d5fa4c270f3b (diff)
downloaddexon-solidity-dbc95570cb4ac53688ebf07c2e5fdbce1ef8089d.tar.gz
dexon-solidity-dbc95570cb4ac53688ebf07c2e5fdbce1ef8089d.tar.zst
dexon-solidity-dbc95570cb4ac53688ebf07c2e5fdbce1ef8089d.zip
Merge pull request #903 from mocamircea/patch-8
Update control-structures.rst
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r--docs/control-structures.rst13
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index ac24a5a9..d2ad0936 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -87,8 +87,7 @@ 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, and the names
-of unused parameters (especially return parameters) can be omitted.
+Function call arguments can also be given by name, in any order.
::
@@ -99,12 +98,20 @@ of unused parameters (especially return parameters) can be omitted.
// named arguments
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 parameters
+::
+
+ contract C {
+ // omitted name for parameter
function func(uint k, uint) returns(uint) {
return k;
}
}
+
.. index:: ! new, contracts;creating