From 01dc055d424ad79d11fc27f007a9b6893ffbf714 Mon Sep 17 00:00:00 2001 From: Mircea Moca Date: Fri, 19 Aug 2016 17:47:57 +0300 Subject: Update contracts.rst I think it's more clear now and without the risk of mentioning the yet discussed accessor concept --- docs/contracts.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/contracts.rst b/docs/contracts.rst index c38fdb9d..3ee98937 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -194,16 +194,16 @@ return parameter list for functions. function setData(uint a) internal { data = a; } uint public data; } - contract Caller { + contract D { function readData(){ C c = new C(); - uint local = c.data(); // call accessor + uint local = c.data(); local = f(7); // error } } -Other contracts can call ``c.data()`` to retrieve the value of data in state -storage, but are not able to call ``f``. Contracts derived from ``C`` can call +An other contract ``D`` can call ``c.data()`` to retrieve the value of data in state +storage, is not able to call ``f``. Contracts derived from ``C`` can call ``setData`` to alter the value of ``data`` (but only in their own state). .. index:: ! accessor;function, ! function;accessor -- cgit