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,aa7f494bf30adbc7 X-Google-Attributes: gid103376,public Newsgroups: comp.lang.ada Subject: Re: [newbie] simple(?) data structures References: <2j1e30Fsrg8vU1@uni-berlin.de> <2jao1qFvj2rgU1@uni-berlin.de> <2jc33qFv3sitU1@uni-berlin.de> <1087475845.607135@master.nyc.kbcfp.com> <10267207.GmbXj46X37@linux1.krischik.com> From: Brian May X-Home-Page: http://snoopy.apana.org.au/~bam/ Date: Fri, 18 Jun 2004 17:30:55 +1000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:EBbKEBx4l029yjUtEAZJ6G3LXSY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: dsl-202-173-153-89.vic.westnet.com.au X-Trace: news.melbourne.pipenetworks.com 1087543855 202.173.153.89 (18 Jun 2004 17:30:55 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news1.google.com!news.glorb.com!news.moat.net!border1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!news.mel.connect.com.au!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:1645 Date: 2004-06-18T17:30:55+10:00 List-Id: >>>>> "Martin" == Martin Krischik writes: >> 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. In C you would probably also need to pass a length parameter. Martin> I allways thought that: Martin> My_Function (My_Data ( 20 .. Data'Last)) Martin> was the answer to that problem. And I find that a lot more Martin> elegant then a pointer. Of corse the compiler might still Martin> us a pointer internally. I was going to say that ;-). -- Brian May