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,50137bb64a119cfc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-19 18:23:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: "access constant" discriminant Date: 19 Feb 2003 18:23:02 -0800 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0302191823.36655f06@posting.google.com> References: <_TO1a.14664$9y2.6601@nwrddc01.gnilink.net> <3CS1a.55972$2H6.1357@sccrnsc04> <3E4E9248.3E71D984@adaworks.com> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1045707782 8142 127.0.0.1 (20 Feb 2003 02:23:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 20 Feb 2003 02:23:02 GMT Xref: archiver1.google.com comp.lang.ada:34242 Date: 2003-02-20T02:23:02+00:00 List-Id: Richard Riehle wrote in message news:<3E4E9248.3E71D984@adaworks.com>... > tmoran@acm.org wrote: > > > A function may have a an access parameter, which almost has in > semantics. However, it is possible to modify a component of > an access parameter. I would like the option of preventing that > with, > > function F (X : access constant parameter-name) > return some-type; > > This would make it illegal for the function to modify the components of > an access parameter. Without the word constant, one could still modify > such components, but including it would make absolutely clear, in the > contract, that such side-effects would be impossible. The "access constant" locution will probably be incorporated into a future update of the language.