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-15 11:59:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!4.24.21.153!chcgil2-snh1.gtei.net!chcgil2-snf1.gtei.net!news.gtei.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: "access constant" discriminant Date: 15 Feb 2003 13:59:43 -0600 Organization: LJK Software Message-ID: References: <_TO1a.14664$9y2.6601@nwrddc01.gnilink.net> <3CS1a.55972$2H6.1357@sccrnsc04> <3E4E9248.3E71D984@adaworks.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1045339079 2603 192.135.80.34 (15 Feb 2003 19:57:59 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Sat, 15 Feb 2003 19:57:59 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:34126 Date: 2003-02-15T13:59:43-06:00 List-Id: In article <3E4E9248.3E71D984@adaworks.com>, Richard Riehle writes: > 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. Why is it necessary to have the parameter be an access type ?