[TUHS] v7 K&R C

ron at ronnatalie.com ron at ronnatalie.com
Thu May 14 22:25:16 AEST 2020

> On Wed, 13 May 2020, Rich Morin wrote:
>> A Fortran implementation I used years ago kept constants in a "literal
>> pool".  So, if you called a subroutine, passing in a constant, there was
>> a possibility that the constant might be modified upon the routine's
>> return.  I don't recall this ever causing a problem in practice, but the
>> possibility was amusing...
> As I dimly recall, Fortran has always used call by value/result (or
> whatever the term is).  So, if you modify an argument that happened to be
> passed as a constant...
Fortran argument passing to functions is call by reference.  Some
compilers had a non-standard exception to allow call by value.

More information about the TUHS mailing list