The following figure shows an animated sequence diagram that draws a return value.

You can use any of the following macros depending on your situation:
Examples:
Example:
Int test(int n) {return n*5;}
void callingFunction()
{
int v;
CALL (v, f00(10));
// after the call v equals 50
}
Example:
A* test() {return new A();}
void callingFunction()
{
A *a;
CALL_INST(a, test());
// after the call a equals new A[0]
}
Examples:
void callingFunction()
{
A *a;
CALL_SER(a, test(), serializeME);}
// after the call v equals <string that serializeMe returns>
}
Even if you choose not to embed these macros in your application, you can still see animated return values by explicitly calling an operation through the Operations window. To call an operation, click the Call operations tool on the Animation toolbar.