aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenton Liu <liu.denton+github@gmail.com>2016-07-09 02:07:58 +0800
committerDenton Liu <liu.denton+github@gmail.com>2016-07-09 02:07:58 +0800
commitcf0579a86eede7cf9b57695f5fa6557c65d4f5a8 (patch)
tree5440cab5f5e9fc822038c7fd5f3a7962ee2652e7
parent14f57568dcee8b2fae60f94d4b77986708c06667 (diff)
downloaddexon-solidity-cf0579a86eede7cf9b57695f5fa6557c65d4f5a8.tar
dexon-solidity-cf0579a86eede7cf9b57695f5fa6557c65d4f5a8.tar.gz
dexon-solidity-cf0579a86eede7cf9b57695f5fa6557c65d4f5a8.tar.bz2
dexon-solidity-cf0579a86eede7cf9b57695f5fa6557c65d4f5a8.tar.lz
dexon-solidity-cf0579a86eede7cf9b57695f5fa6557c65d4f5a8.tar.xz
dexon-solidity-cf0579a86eede7cf9b57695f5fa6557c65d4f5a8.tar.zst
dexon-solidity-cf0579a86eede7cf9b57695f5fa6557c65d4f5a8.zip
Incorporate changes
-rw-r--r--docs/control-structures.rst3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index 8893a8d9..6d334ca2 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -154,11 +154,10 @@ Scoping and Declarations
========================
A variable which is declared will have an initial default value whose byte-representation is all zeros.
-This is because the EVM must run without undefined behaviour so it would be inappropriate to initialize any variables to random garbage values.
The "default values" of variables are the typical "zero-state" of whatever the type is. For example, the default value for a ``bool``
is ``false``. The default value for the ``uint`` or ``int`` types is ``0``. For statically-sized arrays and ``bytes1`` to ``bytes32``, each individual
element will be initialized to the default value corresponding to its type. Finally, for dynamically-sized arrays, ``bytes``
-and ``string``, the default value is an empty array or a zero-length member of its respective type.
+and ``string``, the default value is an empty array or string.
A variable declared anywhere within a function will be in scope for the *entire function*, regardless of where it is declared.
This happens because Solidity inherits its scoping rules from JavaScript.