|
For the first problem, should we give an example of what our procedure does on something specific (ie with this, F(2) = 12, this F(2) = 13 etc) to show the differences?Yes.
should we consider just before the end of the procedure or what it leaves the data as or both[?]We are interested in the state after return from the procedure call. Local state inside the procedure activation is irrelevant.
would we consider:Yes, this example would distinguish call by value (without result) from all of the other calling strategies, because there would be no impact on the value of the actual parameter substituted forto have left i alone when call by value is used and to have incremented it by one when call by reference? i in the call. But just in case somebody missed it: notice that the assignment refers to call by value/result, and this example doesn't distinguish any of the three methods in the actual assignment.
Mike O'D. |
to: