From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25574 invoked from network); 14 May 2020 03:10:25 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 14 May 2020 03:10:25 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 469F09C698; Thu, 14 May 2020 13:10:22 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 3574E9C668; Thu, 14 May 2020 13:10:09 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JUie7CFi"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 476D99C668; Thu, 14 May 2020 13:10:07 +1000 (AEST) Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) by minnie.tuhs.org (Postfix) with ESMTPS id B3B4A9C604 for ; Thu, 14 May 2020 13:10:06 +1000 (AEST) Received: by mail-vs1-f51.google.com with SMTP id z1so1088076vsn.11 for ; Wed, 13 May 2020 20:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zUjHvL9TdHdXSC8vzepJbd/PYdBQ2P9VSQZoArhq558=; b=JUie7CFitiUsigZUVFhkL5Q02wTQ5JlTfVk8SkUttGAp+SSdu7oaIp3oGCHsAT/fKU xF3vW4OwqjcVakvNjR8M0AzjvDOMzYck86Sy29OX1h9eNes52tUjMyh9bQQqLFC2oHS0 jURt7dj443gFVAJ80NqwnCcnUzx6MgCOWEDsMUfQsUo/PKQC9W0ifue3lccrDVhx2FNG of3ef3PQiDBemWstpoDHvRLyGfBDTVRtr5fAtuu2W+8OM4dqjLeEjYtXhu0lQESrMExK UBGcQQFfD465du9sOw4W9C0mEZ+LD054144wJl+4Cb+rmAMXUiN//P+I7lh4jQwq2yrE cemw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zUjHvL9TdHdXSC8vzepJbd/PYdBQ2P9VSQZoArhq558=; b=JSROnkzWImtWarjApB+Wc5D6zVqSya0SuNO/+i91QM80aBc8+fuDGUfqzwKmHspUKW n4odBtETO87cmGa3rwNimaiu9GhXTEznsSHioASIijobTa68R1Ac84gzdMqL0cCmCbdy HqemNlesq+1Izt+0XnF09cMcoWFdIS1lkhfigkQ2lx4KUMLhtpcTH8vcVwBFvlhhUE3a CIUYcejylxLmRM5hf4IRTHAHONz79a44wHrE3pISeri0QMwZV6RsBu9mfRCp7naX+FUC FbmqjHnS5HfHdfvuYdFBQlDq7eRjZI9kKxh5DmYp1AJLWXaOVw2B6YqcmMx9b2X7t4WD 7t3g== X-Gm-Message-State: AOAM531sDif/fF+M2TVOcAUXB5/eqz3GOjwylf/qqjchB2nCasNQTo9t 4H01SmN5XnvtSzB72fDrvAV7j3IQiKia77vPdFI= X-Google-Smtp-Source: ABdhPJxg4FJUP8LABjTKrohj9pObfl/60uRAd6Rxd1PolPrxeaFrWco05YY99SSOR4gkbBpSBhF91ruYy3hT/tlRMs4= X-Received: by 2002:a67:14c7:: with SMTP id 190mr1704079vsu.120.1589425805684; Wed, 13 May 2020 20:10:05 -0700 (PDT) MIME-Version: 1.0 References: <3cb1126796176debe28aa66672ba27ae@yaccman.com> <20200511005745.GL17035@mcvoy.com> <357EFE54-BD94-4C10-8C43-C6735BF7D317@via.net> <20200511202555.GU17035@mcvoy.com> <71163EB4-683D-47DE-AAE2-93BF55C483E6@cfcl.com> In-Reply-To: <71163EB4-683D-47DE-AAE2-93BF55C483E6@cfcl.com> From: Charles Anthony Date: Wed, 13 May 2020 20:09:51 -0700 Message-ID: To: Rich Morin Content-Type: multipart/alternative; boundary="0000000000008b73a805a59308a4" Subject: Re: [TUHS] v7 K&R C X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --0000000000008b73a805a59308a4 Content-Type: text/plain; charset="UTF-8" On Wed, May 13, 2020 at 7:45 PM Rich Morin wrote: > > On May 13, 2020, at 17:42, John P. Linderman 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 --0000000000008b73a805a59308a4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, May 13, 2020 at 7:45 PM Rich = Morin <rdm@cfcl.com> wrote:
> On May 13, 2020,= at 17:42, John P. Linderman <jpl.jpl@gmail.com> wrote:
>
> I never liked call by reference. When I was trying to understand a chu= nk of code, it was a great mental simplification to know that whatever a ca= lled routine did, it couldn't have an effect on the code I was trying t= o understand except through a returned value and (ghastly) global variables= . ...

A Fortran implementation I used years ago kept constants in a "literal= pool".=C2=A0 So, if you called a subroutine, passing in a constant, t= here was a possibility that the constant might be modified upon the routine= 's return.=C2=A0 I don't recall this ever causing a problem in prac= tice, but the possibility was amusing...

=C2=A0

Ah yes.=C2=A0 A long time ago, some one c= ame to me with a mysteriously behaving Pr1me FORTRAN program; after much he= ad scratching, I found where they were changing the value of "0".=

=C2=A0-- Charles

--
X-Clacks-Overhead: GNU Terry Pratchet= t
--0000000000008b73a805a59308a4--