aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenton Liu <liu.denton+github@gmail.com>2016-08-26 03:44:16 +0800
committerDenton Liu <liu.denton+github@gmail.com>2016-08-26 03:44:16 +0800
commitf5989fb5e0c429c822c0715e6f52da310ddc31a1 (patch)
treea63dac904e5c9a42c7e9d5abeccda8d2f53ddb03
parentc276086f3fcce0317abd45452d74c18aa0522ed9 (diff)
downloaddexon-solidity-f5989fb5e0c429c822c0715e6f52da310ddc31a1.tar.gz
dexon-solidity-f5989fb5e0c429c822c0715e6f52da310ddc31a1.tar.zst
dexon-solidity-f5989fb5e0c429c822c0715e6f52da310ddc31a1.zip
Correct spacing
-rw-r--r--docs/contracts.rst36
1 files changed, 18 insertions, 18 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index b257dcbb..54bd7d55 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -211,18 +211,18 @@ storage and is not able to call ``f``. Contract ``E`` is derived from ``C`` and
contract D {
function readData() {
- C c = new C();
- local = c.f(7); // error: member "f" is not visible
- c.setData(3);
- uint local = c.getData();
- local = c.compute(3,5); // error: member "compute" is not visible
- }
+ C c = new C();
+ local = c.f(7); // error: member "f" is not visible
+ c.setData(3);
+ uint local = c.getData();
+ local = c.compute(3,5); // error: member "compute" is not visible
+ }
}
contract E is C {
function g() {
- C c = new C();
- uint val = compute(3,5); // acces to internal member (from derivated to parent contract)
+ C c = new C();
+ uint val = compute(3,5); // acces to internal member (from derivated to parent contract)
}
}
@@ -244,12 +244,12 @@ be done at declaration.
contract C {
uint public data = 42;
}
-
+
contract Caller {
- C c = new C();
- function f() {
- uint local = c.data();
- }
+ C c = new C();
+ function f() {
+ uint local = c.data();
+ }
}
The accessor functions have external visibility. If the
@@ -260,11 +260,11 @@ it is evaluated as state variable and if it is accessed externally
::
contract C {
- uint public data;
- function x() {
- data = 3; // internal access
- uint val = this.data(); // external access
- }
+ uint public data;
+ function x() {
+ data = 3; // internal access
+ uint val = this.data(); // external access
+ }
}
The next example is a bit more complex: