aboutsummaryrefslogtreecommitdiffstats
path: root/docs/control-structures.rst
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-11 06:07:27 +0800
committerchriseth <chris@ethereum.org>2017-07-14 03:47:29 +0800
commit41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f (patch)
tree8b8e9eb1136a3705c2e6b9bff04ba1243832db31 /docs/control-structures.rst
parentb2fcd59ee6941de4a392b89295c734385d6019e3 (diff)
downloaddexon-solidity-41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f.tar.gz
dexon-solidity-41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f.tar.zst
dexon-solidity-41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f.zip
Fix bugs in example contracts
Diffstat (limited to 'docs/control-structures.rst')
-rw-r--r--docs/control-structures.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index c7185e22..f4c0b776 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -181,7 +181,9 @@ parameters from the function declaration, but can be in arbitrary order.
pragma solidity ^0.4.0;
contract C {
- function f(uint key, uint value) { ... }
+ function f(uint key, uint value) {
+ // ...
+ }
function g() {
// named arguments
@@ -323,6 +325,8 @@ This happens because Solidity inherits its scoping rules from JavaScript.
This is in contrast to many languages where variables are only scoped where they are declared until the end of the semantic block.
As a result, the following code is illegal and cause the compiler to throw an error, ``Identifier already declared``::
+ // This will not compile
+
pragma solidity ^0.4.0;
contract ScopingErrors {