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?


You can use double return in a function.

To get the returned value in your example use:

  uint256 c;
  uint256 d;
  (c,d) = f();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.