diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-11-25 01:32:45 +0800 |
---|---|---|
committer | Yoichi Hirai <i@yoichihirai.com> | 2016-11-25 17:43:05 +0800 |
commit | fed50403ffdf16806fd4bc0aee1587e22576d4d0 (patch) | |
tree | 677be0b5e0ad6137f3a9b7ea5c21b995742c1463 | |
parent | 0599a14954aa0c22c992ae4585010a97cce63ca1 (diff) | |
download | dexon-solidity-fed50403ffdf16806fd4bc0aee1587e22576d4d0.tar.gz dexon-solidity-fed50403ffdf16806fd4bc0aee1587e22576d4d0.tar.zst dexon-solidity-fed50403ffdf16806fd4bc0aee1587e22576d4d0.zip |
docs: cleaning references to C; smoothing parameter syntax description
-rw-r--r-- | docs/control-structures.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 4879a10e..974a093f 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -7,15 +7,15 @@ Expressions and Control Structures Input Parameters and Output Parameters ====================================== -Like in Javascript and in C, functions may take parameters as input; +As in Javascript, functions may take parameters as input; unlike in Javascript and C, they may also return arbitrary number of parameters as output. Input Parameters ---------------- -The input parameters are declared type followed -by name (though unused input parameters do not need names). +The input parameters are declared the same way as variables are. As an +exception, unused parameters can omit the variable name. For example, suppose we want our contract to accept one kind of external calls with two integers, we would write something like:: @@ -57,7 +57,7 @@ of assignment. Control Structures =================== -Most of the control structures from C or JavaScript are available in Solidity +Most of the control structures from JavaScript are available in Solidity except for ``switch`` and ``goto``. So there is: ``if``, ``else``, ``while``, ``do``, ``for``, ``break``, ``continue``, ``return``, ``? :``, with the usual semantics known from C or JavaScript. |