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,cab230a084a14384 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: ++ of C in ada Date: 25 Jul 2005 16:15:34 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1122228917.377279.262690@g47g2000cwa.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1122322534 9444 192.74.137.71 (25 Jul 2005 20:15:34 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 25 Jul 2005 20:15:34 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:3769 Date: 2005-07-25T16:15:34-04:00 List-Id: "nicolas.b" writes: > How can i implement the operator ++ in ada : > > type T_Ptr is access all T_Item; > How can i implement : procedure Increment (Ptr : in out T_Ptr); You can implement such a thing using System.Storage_Elements and System.Address_To_Access_Conversions. Why do you want to use address arithmetic on T_Ptr? I'm sure you'll get lots of responses saying you *don't* want to do that, but there are some rare cases where it might be a good idea. - Bob