How can i get the a and b from the following function:
function f() returns (uint a, uint b){
}
funtion g(){
uint s = f();
}
do i need to just use one return parameter?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityHow can i get the a and b from the following function:
function f() returns (uint a, uint b){
}
funtion g(){
uint s = f();
}
do i need to just use one return parameter?
You can use double return in a function.
To get the returned value in your example use:
uint256 c;
uint256 d;
(c,d) = f();