[TUHS] v7 K&R C

Charles Anthony 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".

 -- Charles

>
> --
X-Clacks-Overhead: GNU Terry Pratchett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20200513/3db1d264/attachment.htm>


More information about the TUHS mailing list