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.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 28802 invoked from network); 26 Apr 2020 20:11:12 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 26 Apr 2020 20:11:12 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 723379C97B; Mon, 27 Apr 2020 06:11:05 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id E96189C95D; Mon, 27 Apr 2020 06:10:46 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id E2D5D9C95D; Mon, 27 Apr 2020 06:10:44 +1000 (AEST) Received: from clarinet.employees.org (clarinet.employees.org [198.137.202.74]) by minnie.tuhs.org (Postfix) with ESMTPS id A0C5A9C95A for ; Mon, 27 Apr 2020 06:10:44 +1000 (AEST) Received: by clarinet.employees.org (Postfix, from userid 1736) id 8AECA4E11CAD; Sun, 26 Apr 2020 20:10:44 +0000 (UTC) Date: Sun, 26 Apr 2020 21:10:44 +0100 From: Derek Fawcus To: tuhs@tuhs.org Message-ID: <20200426201044.GB87816@clarinet.employees.org> References: <20200425180357.A004918C0B6@mercury.lcs.mit.edu> <20200426193704.GA87816@clarinet.employees.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200426193704.GA87816@clarinet.employees.org> 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: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" 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