finding return value in fuction - debugging

  • Thread starter Thread starter guy
  • Start date Start date
G

guy

If I have a break point at the end of a function, how do I determine what
the return value of the function is if it's not in a local variable - for
e.g. one function is returning a call to another function:

bool func1()
{
return func2();
}

Thanks
 
Well, add func1() or funct2() to the Watch window. It
would show up over there, if func1() returns true or false

HTH

Kumar
 
bool func1()
{
bool bRetVal = func2();
return bRetVal;
}

More verbose, I know. But it is a good idea to write code with your
debugging sessions in mind.

Adam.


--
===========================
Adam Benson
Omnibus Systems,
Leics. UK
Email : (e-mail address removed)
 
True Adam... but every now and then you find yourself in a situation where
you've forgotten to do that you you want to know what the return value's
going to be...
 
I thought I'd tried that without any luck...? Perhaps I was mistaken.

Putting func2() in the watch window: does that evaluate the function as
well? if so that would cause cause if func2() for example incremented a
counter. then your debugger would be altering the values in app...
 
Back
Top