summaryrefslogtreecommitdiffhomepage
path: root/solidity.html.markdown
diff options
context:
space:
mode:
authorpnf408 <paulfahn@gmail.com>2016-09-27 07:41:22 -0700
committerven <vendethiel@hotmail.fr>2016-09-27 16:41:22 +0200
commitacd1ac461145fa48fde52d8cadfd5d01fdba512a (patch)
tree56b384307e5ef045d2fee13344a304e35d5680e4 /solidity.html.markdown
parentf6ada69ff92e1b501114a7ea1df3073c9131a570 (diff)
corrections in mapping example (#2371)
fixed two small errors in the example mapping called balances
Diffstat (limited to 'solidity.html.markdown')
-rw-r--r--solidity.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/solidity.html.markdown b/solidity.html.markdown
index 9bf5bf4d..0ad8af32 100644
--- a/solidity.html.markdown
+++ b/solidity.html.markdown
@@ -230,9 +230,9 @@ mapping (string => uint) public balances;
balances["charles"] = 1;
console.log(balances["ada"]); // is 0, all non-set key values return zeroes
// 'public' allows following from another contract
-contractName.balances("claude"); // returns 1
+contractName.balances("charles"); // returns 1
// 'public' created a getter (but not setter) like the following:
-function balances(address _account) returns (uint balance) {
+function balances(string _account) returns (uint balance) {
return balances[_account];
}