I have a function with 4 return values which are in different types. Within the same contract, I want another function get this return values. For example,
function myFunction1() returns (uint, string, address){
......
}
funtion myFunction2(){
String s = myFunction1();
}
I want string s get the second value returned by myFunction1. How can I do that?
Best Answer
See the section on "destructuring assignments and returning multiple values" in the Solidity documentation.
As an example:
However, it should be noted that you can't return dynamically sized values, as per this previous answer.