Creating sequence diagram elements Animation of the return value for an operation Note This feature is not supported in Rational Rhapsody in J. To show the return value of a function as a reply message in an animated sequence diagram, you can use one of a number of predefined macros within the code of your function. This means that the return value for your function visually displays as a reply message on your sequence diagram. The same is true for a trace of a function. 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: Љ OM_RETURN .
Use this macro in the body of an operation instead of the regular “return” statement: Examples: – Int Test(int& x) {x = 5; OM_RETURN(10);} – A* Test() {OM_RETURN(newA());} Rational Rhapsody 691