On 13 May 2017 at 19:21, Dave Horsfall <dave(a)horsfall.org> wrote:
On Sat, 13 May 2017, Random832 wrote:
Fortran, for the record, passes nearly everything
by reference [...]
And if you passed a constant and the local argument was modified, so was
the (single instance of) constant...
Probably depends on the implementation. VAX-FORTRAN passed by
reference (but not on the stack).
Off-topic: I recall a working function that crashed when fed a
constant string. Spelunking revealed that someone had replaced a
letter-by-letter case-insensitive comparison with a "faster version"
(written in VAX assembler, no less) that converted both arguments to
upper case and then block-compared.
N.