mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update introduction-to-smart-contracts.rst
This commit is contained in:
parent
dfac04d139
commit
2b23d02c83
@ -118,9 +118,11 @@ that is publicly accessible. The ``address`` type is a 160-bit value
|
|||||||
that does not allow any arithmetic operations. It is suitable for
|
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,
|
from outside of the contract.
|
||||||
but raw implementation would look something like this::
|
Without this keyword, other contracts have no way to access the variable.
|
||||||
|
The code of the function generated by the compiler is roughly equivalent
|
||||||
|
to the following::
|
||||||
|
|
||||||
function minter() returns (address) { return minter; }
|
function minter() returns (address) { return minter; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user