I wanna know how to get multiple return values from function in Solidity Thanks!
1 Answer
In Solidity was old method to get multi-return values from function through keyword var
but is was deprecated in 0.5.0 if i'm not mistake
Solidity allows functions to return multiple values. Here is an example to demonstrate this:
{
function a() returns (int a, string b)
{
return (1, "Hello");
}
function b()
{
int A;
string memory B;
//A is 1 and B is "Hello"
(A, B) = a();
//A is 1
(A,) = a();
//B is "Hello"
(, B) = a();
}
}