Pass By Value-Result
SUBROUTINE F(NA, NB) NA = NA + 3 NB = NB + 5 END NX = 10 NY = 25 CALL F(NX, NY) PRINT *, NX, NY NX = 10 CALL F(NX, NX) PRINT *, NX END

If pass-by-reference is used, this gives the same result as the C++ expample:

13 30 18

If value-result is used, the results depend on which parameter is returned last. If done left-to-right, so NB is returned last, we get:

13 30 15

If NA goes last, the last value is 13. This is because NA and NB are not alaises during the execution, each with an initial value of 10.