Fortran, for the record, passes nearly everything by
reference
Sort of. The Fortran 77 standard imposes restrictions that appear to
be intended to allow the implementation to pass by value-and-result
(i.e. values are copied in, and copied back at return). In particular
it disallows aliasing that would allow you to distinguish between
the two methods:
If a subprogram reference causes a dummy argument in the referenced
subprogram to become associated with another dummy argument in the
referenced subprogram, neither dummy argument may become defined
during execution of that subprogram.
http://www.fortran.com/F77_std/rjcnf-15.html#sh-15.9.3.6
-- Richard
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.