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-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!14bb18d8!not-for-mail Sender: mheaney@MHEANEYX200 Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) References: <1700922.2nPlMsa4Ny@linux1.krischik.com> <1636756.M7hCqjsVMv@linux1.krischik.com> <4c2ec8a8.0410012248.2708edd2@posting.google.com> From: Matthew Heaney Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 02 Oct 2004 13:32:42 GMT NNTP-Posting-Host: 64.185.133.124 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1096723962 64.185.133.124 (Sat, 02 Oct 2004 06:32:42 PDT) NNTP-Posting-Date: Sat, 02 Oct 2004 06:32:42 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news1.google.com comp.lang.ada:4563 Date: 2004-10-02T13:32:42+00:00 List-Id: slatyb@yahoo.com (K) writes: > This is pretty easy with the C++ pointer-to-member construct, but Ada > lacks that construct so you have to instead wrap the data members with > a function so you can store an access-to-function. But it's worse, > since you will need two functions, one to read the datum and one to > set it. You're still confused: function A (O : access T) return Integer_Access; --Ada95 O : aliased T; N : Integer; begin A (O'Access).all := 42; N := A (O'Access).all; end;