diff --git a/tutorial-20/Assignments.sol b/tutorial-20/Assignments.sol index 5dfd9a8..7a31f83 100644 --- a/tutorial-20/Assignments.sol +++ b/tutorial-20/Assignments.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.0; +pragma solidity ^0.5.0; contract Assignments { function returnFirstValue(uint a, uint b) returns (uint) { @@ -9,15 +9,15 @@ contract Assignments { return returnFirstValue({b:4, a:8}); } - function returnAllValues(uint a, uint b, uint c) returns (uint, uint, uint) { + function returnAllValues(uint a, uint b, uint c) public returns (uint, uint, uint) { return (a,b,c); } function callerAll() public returns (uint, uint, uint) { - var(x,y,z) = returnAllValues(4,5,6); + (uint x, uint y, uint z) = returnAllValues(4,5,6); (x,y) = (y,x); - (x,) = returnAllValues(5,10,15); - (,z) = returnAllValues(10,20,30); + (x,,) = returnAllValues(5,10,15); + (,,z) = returnAllValues(10,20,30); return (x,y,z); } -} \ No newline at end of file +}