mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Other contracts can't write to a public variable
The removed words implied that other contracts can write to a public variable.
This commit is contained in:
parent
4220f01688
commit
51a150e82a
@ -109,8 +109,7 @@ that does not allow any arithmetic operations. It is suitable for
|
|||||||
storing addresses of contracts or keypairs belonging to external
|
storing addresses of contracts or keypairs belonging to external
|
||||||
persons. The keyword ``public`` automatically generates a function that
|
persons. The keyword ``public`` automatically generates a function that
|
||||||
allows you to access the current value of the state variable.
|
allows you to access the current value of the state variable.
|
||||||
Without this keyword, other contracts have no way to access the variable
|
Without this keyword, other contracts have no way to access the variable.
|
||||||
and only the code of this contract can write to it.
|
|
||||||
The function will look something like this::
|
The function will look something like this::
|
||||||
|
|
||||||
function minter() returns (address) { return minter; }
|
function minter() returns (address) { return minter; }
|
||||||
|
Loading…
Reference in New Issue
Block a user