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,daf1e35a4e978e9d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-21 04:45:09 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: have to use unrestricted access but just what about access Date: 21 Jun 2002 04:45:08 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0206210345.2d58d8e0@posting.google.com> References: <0x8Q8.6779$ZP1.1263481@news11-gui.server.ntli.net> NNTP-Posting-Host: 205.232.38.243 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1024659909 19236 127.0.0.1 (21 Jun 2002 11:45:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 21 Jun 2002 11:45:09 GMT Xref: archiver1.google.com comp.lang.ada:26548 Date: 2002-06-21T11:45:09+00:00 List-Id: Robert A Duff wrote in message news:... > "chris.danx" writes: > > > How can the unrestricted_access attribute be replaced by just access in the > > following code? > > You should be using 'Unchecked_Access here, which is a standard feature > of Ada (albeit unsafe). > > 'Unrestricted_Access is a feature of GNAT, and is not necessary in your > example. > > - Bob Bob look again! One of the nasty restrictions in Ada 95 is that you cannot make parameters aliased. This means that they can never be used in access attributes. This is indeed one use of unrestricted access that is useful and legitimate, though of course passing such an access value out assumes call by reference, and you have to be sure that you can gaurantee call by reference.