From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 Received: (qmail 14723 invoked from network); 26 Apr 2020 22:39:33 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 26 Apr 2020 22:39:33 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 3CCDB9C96B; Mon, 27 Apr 2020 08:39:32 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 39D9D9C95E; Mon, 27 Apr 2020 08:39:08 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rywva/Wf"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 147E59C95E; Mon, 27 Apr 2020 08:39:06 +1000 (AEST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by minnie.tuhs.org (Postfix) with ESMTPS id 686209C95A for ; Mon, 27 Apr 2020 08:39:05 +1000 (AEST) Received: by mail-wr1-f45.google.com with SMTP id d17so18359392wrg.11 for ; Sun, 26 Apr 2020 15:39:05 -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=l5Pgpl0XYZq6/2kdukJXzTmUKZId/So1IwQu4WA9jlw=; b=rywva/Wfscv2e595BALBt1Ols7qFCJaSaBAovrpR1eXynnpJE5XTy/YvHP+73AnLmO lHPSJUG3dP13ODwDhY8BGhXNp70GJoly+DNLHZVPRfwdEUyREnF2S45TuMC35hRga7tT MBedHJhWdjMstnMMThHAVcPOdfjHoR3sjfsjGtveItv28EF5V+wJl4kMwDv7Joyh6fjo e/NrzuyOIA8KVtI8Hc6d09p/Fuj5FF9BgJE45qEqqH5Re0p+SSz8FqMEiHdbKMr4yvmG IxEq2Qr+jLFJ4bE2wNYnwGofJ6ynCGUvWnGiiNm4nEalzRx7H9z6B56+Ew/jaxcCWdmS 3oqg== 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=l5Pgpl0XYZq6/2kdukJXzTmUKZId/So1IwQu4WA9jlw=; b=NaW+qUInQlbJFe2G5QKHfRbmmbYCH/LDUmTpBUaM8H3Ue278P8Fyo8TbJQ6Qbp03dD +XElGq7/aYrodyLqOe9ItqoIt0b/3OJYhS+vNKU6pAbQXKl9HUDVuz7iofA+sr60/puA f6WwJlbZy85YUktVPfo//EK5ZlfeSmSXUsIhgaRFLmLOLypJ7uaEsLZrsUYZApea8/ZD j5085veBfHwkz8XpR0xypOD9s+mq8uq1j/7Go3R7IiHy5BfYCIckW5Eq+BUQ72PeWsOz qHJHtjHr89GQU+xqCg3wt9RpGEE3o+gtQBpG6t1WrkItHOsMq7YxxuDXsXOXvQhBeX8m 1a9w== X-Gm-Message-State: AGi0PuaRaD28t/KIeyKhQfETStNQUatrdCJUIaBH8UqXnBB2h7vxSdAa 5aPgTCZPTXH5iTwINqCyn6tLhdUde8LCi3lgpd4= X-Google-Smtp-Source: APiQypLTszHnB7XaEHAhu57v6q2NsMBV1gjCAJ3XJWJEPw6tSV1bqvZmf0HDrXprbPYJ2uJ69vq7N5TeIPREZuQPliA= X-Received: by 2002:a05:6000:10:: with SMTP id h16mr23881703wrx.295.1587940743965; Sun, 26 Apr 2020 15:39:03 -0700 (PDT) MIME-Version: 1.0 References: <20200425180357.A004918C0B6@mercury.lcs.mit.edu> <20200426193704.GA87816@clarinet.employees.org> <20200426201044.GB87816@clarinet.employees.org> In-Reply-To: <20200426201044.GB87816@clarinet.employees.org> From: Noel Hunt Date: Mon, 27 Apr 2020 08:38:39 +1000 Message-ID: To: Derek Fawcus Content-Type: multipart/alternative; boundary="000000000000f7f00b05a439432c" 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" --000000000000f7f00b05a439432c Content-Type: text/plain; charset="UTF-8" Tom Cargill makes (made) frequent use of this construction in 'pi' (process inspector, first in Eight Edition), e.g., asm.c: _asm->core->process()->openmemory(addr); frame.c: return core->process()->frame(level-1)->regloc((int)v->range.lo, v->type.size_of()); phrase.c: frame->symtab()->core()->process()->openmemory(expr->val.lng); On Mon, Apr 27, 2020 at 6:11 AM Derek Fawcus < dfawcus+lists-tuhs@employees.org> wrote: > On Sun, Apr 26, 2020 at 08:37:04PM +0100, Derek Fawcus wrote: > > No, I think he means something like: > > > > (*((*((*((*f)()->g))()->h))()->i))() > > > > but I can't recall the relative priority of '*' and '->' in > > the above, so I may have added unnecessary parens. > > Actually trying it, while the above does the right thing, > I can also get the following to compile with a modern compiler > > (*(*(*(*f)()->g)()->h)()->i)(); > > So maybe that was the answer? > > I guess I'd have to question why someone would wish to write > such a construct, as error handling seems awkward. Even in > the modern form. > > DF > --000000000000f7f00b05a439432c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Tom Cargill makes (made) fre= quent use of this construction in 'pi'
(process inspector, first i= n Eight Edition), e.g.,

asm.c:=C2=A0 _asm->core->process()->openmemory(addr= );
fr= ame.c: return core->process()->frame(level-1)->regloc((int)v->r= ange.lo, v->type.size_of());
phrase.c:=C2=A0 frame->symtab()->core()-&g= t;process()->openmemory(expr->val.lng);


--000000000000f7f00b05a439432c--