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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aa7f494bf30adbc7 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: [newbie] simple(?) data structures Date: Fri, 18 Jun 2004 07:47:21 +0200 Organization: AdaCL Message-ID: <10267207.GmbXj46X37@linux1.krischik.com> References: <2j1e30Fsrg8vU1@uni-berlin.de> <2jao1qFvj2rgU1@uni-berlin.de> <2jc33qFv3sitU1@uni-berlin.de> <1087475845.607135@master.nyc.kbcfp.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1087538628 02 5740 7RCsXmklawfRSO- 040618 06:03:48 X-Complaints-To: usenet-abuse@t-online.de X-ID: boKohrZBrent33p2-pKeAbuWIOH82tLVCUy5xvDh5-V4mDHcrEgJZ6 User-Agent: KNode/0.7.7 Xref: g2news1.google.com comp.lang.ada:1644 Date: 2004-06-18T07:47:21+02:00 List-Id: Hyman Rosen wrote: > David Starner wrote: >> Turning an index into a point has >> been standard in optimizing compilers for at least a decade. > > But if you want to call a subroutine to work on part of an array, > in C you can create a pointer into the middle of the array and > pass that, while in Ada you would need to pass both an array and > an index. That's not so easy to optimize away. I allways thought that: My_Function (My_Data ( 20 .. Data'Last)) was the answer to that problem. And I find that a lot more elegant then a pointer. Of corse the compiler might still us a pointer internally. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com