From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-25 13:07:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!newsfeed.telus.net!rip!news.webusenet.com!peer01.cox.net!cox.net!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news-binary.blueyonder.co.uk.POSTED!53ab2750!not-for-mail User-Agent: Microsoft-Entourage/10.1.1.2418 Subject: Re: Ideas for Ada 200X From: Bill Findlay Newsgroups: comp.lang.ada Message-ID: References: <3EE7CC70.E1FD3A67@adaworks.com> <3EECA772.4B662024@adaworks.com> Mime-version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Date: Wed, 25 Jun 2003 21:06:18 +0100 NNTP-Posting-Host: 80.195.75.181 X-Complaints-To: abuse@blueyonder.co.uk X-Trace: news-binary.blueyonder.co.uk 1056571651 80.195.75.181 (Wed, 25 Jun 2003 20:07:31 GMT) NNTP-Posting-Date: Wed, 25 Jun 2003 20:07:31 GMT Organization: blueyonder (post doesn't reflect views of blueyonder) Xref: archiver1.google.com comp.lang.ada:39739 Date: 2003-06-25T21:06:18+01:00 List-Id: On 24/6/03 11:11, in article slrnbfg8vd.nq.lutz@taranis.iks-jena.de, "Lutz Donnerhacke" wrote: > * AG wrote: >> Seriously though, what's the (*) & X semantics? > > The LHS 'X' is not evaluated twice to get the parameter a of the function "&". > For the parameter b of the same function "&", 'X' is evaluated a second time. >> Is X allowed to be a function returning some access value? > Yes. >> If so, will (*) require second call to the function (with potentially >> different result) or not? > (*) is required to NOT evaluate the LHS expression once more. > Furthermore this construct is required to evaluate the LHS expression before > any part of the RHS. I see the semantics of idem as being well described by the following (which would need much refinement before being precise enough for inclusion in a standard, of course): Let: X := f(idem); be equivalent to declaring the procedure: procedure update_V_with_f (V : in out the_type_of_X) is begin V := f(V); end ; in the environment of the assignment, and executing: update_V_with_f (X); instead of the the assignment. Naturally, update_V_with_f is intended to be an unspellable identifier so that it cannot be called explicitly, etc, etc. -- Bill-Findlay chez blue-yonder.co.uk ("-" => "")