diff options
author | Daniel Kronovet <kronovet@gmail.com> | 2018-06-04 20:00:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-04 20:00:55 +0800 |
commit | 1a603625d49d615b883118b083b1b962ba7e64f7 (patch) | |
tree | 5b7fb0b03d92ab0d4843dd2ea9965667c2a0224e /docs | |
parent | 0d4adc44c9ef269b81f42fc56658a7b0e1f3156c (diff) | |
download | dexon-solidity-1a603625d49d615b883118b083b1b962ba7e64f7.tar dexon-solidity-1a603625d49d615b883118b083b1b962ba7e64f7.tar.gz dexon-solidity-1a603625d49d615b883118b083b1b962ba7e64f7.tar.bz2 dexon-solidity-1a603625d49d615b883118b083b1b962ba7e64f7.tar.lz dexon-solidity-1a603625d49d615b883118b083b1b962ba7e64f7.tar.xz dexon-solidity-1a603625d49d615b883118b083b1b962ba7e64f7.tar.zst dexon-solidity-1a603625d49d615b883118b083b1b962ba7e64f7.zip |
Denote `getData` as view
Diffstat (limited to 'docs')
-rw-r--r-- | docs/contracts.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index fa6b4564..3d6ee869 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -196,7 +196,7 @@ In the following example, ``D``, can call ``c.getData()`` to retrieve the value function f(uint a) private pure returns(uint b) { return a + 1; } function setData(uint a) public { data = a; } - function getData() public returns(uint) { return data; } + function getData() public view returns(uint) { return data; } function compute(uint a, uint b) internal pure returns (uint) { return a + b; } } |