[TUHS] v7 K&R C
charles.unix.pro at gmail.com
Thu May 14 13:09:51 AEST 2020
On Wed, May 13, 2020 at 7:45 PM Rich Morin <rdm at cfcl.com> wrote:
> > On May 13, 2020, at 17:42, John P. Linderman <jpl.jpl at gmail.com> wrote:
> > I never liked call by reference. When I was trying to understand a chunk
> of code, it was a great mental simplification to know that whatever a
> called routine did, it couldn't have an effect on the code I was trying to
> understand except through a returned value and (ghastly) global variables.
> 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...
Ah yes. A long time ago, some one came to me with a mysteriously behaving
Pr1me FORTRAN program; after much head scratching, I found where they were
changing the value of "0".
X-Clacks-Overhead: GNU Terry Pratchett
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TUHS