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