From 884ea39d858c517f82196ecb2cf53bf10f46aa55 Mon Sep 17 00:00:00 2001 From: kevinflo Date: Mon, 2 Apr 2018 13:57:19 +0900 Subject: Removed documentation reference to the now-depricated var tuple variable assignment syntax --- docs/control-structures.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 46e076e5..cdc2d20d 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -284,10 +284,12 @@ Solidity internally allows tuple types, i.e. a list of objects of potentially di } function g() public { - // Declares and assigns the variables. Specifying the type explicitly is not possible. - var (x, b, y) = f(); - // Assigns to a pre-existing variable. - (x, y) = (2, 7); + // Variables declared with type + uint x; + bool b; + uint y; + // These pre-existing variables can then be assigned to the tuple values + (x, b, y) = f(); // Common trick to swap values -- does not work for non-value storage types. (x, y) = (y, x); // Components can be left out (also for variable declarations). -- cgit v1.2.3 From d662622b25ab737887d0c002aec76fc3bbbaf909 Mon Sep 17 00:00:00 2001 From: Kevin Florenzano Date: Thu, 5 Apr 2018 17:12:48 +0900 Subject: Variable assignment wording change --- docs/control-structures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/control-structures.rst b/docs/control-structures.rst index cdc2d20d..40070a20 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -288,7 +288,7 @@ Solidity internally allows tuple types, i.e. a list of objects of potentially di uint x; bool b; uint y; - // These pre-existing variables can then be assigned to the tuple values + // Tuple values can be assigned to these pre-existing variables (x, b, y) = f(); // Common trick to swap values -- does not work for non-value storage types. (x, y) = (y, x); -- cgit v1.2.3