How to access the value if return multi value in a function at the same time

jialeirongjialeirong Member Posts: 3
I was implementing a solidity contract with the truffle framework.

there is a demo function like that
function f() returns (uint , bool) { // do something return (1, true); }
while when i write my test file, i found i can't access the return value correctly.
my test file just like that

it ("Test block" , function(done) { var contract = Contract.deployed(); contract.f().then(function(id , success){ // do something }).then(done).catch(done); });
i found there was only one return value like a address type.

So how can i access those return value correctly? Is there any wrong in test file or contract itself?
Sign In or Register to comment.