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-Thread: 103376,ad4585f2971e47c5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 20 Feb 2011 04:40:04 -0600 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Need some light on using Ada or not Date: Sun, 20 Feb 2011 10:42:52 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <4d5ef836$0$23753$14726298@news.sunsite.dk> <7ibvl6tn4os3njo3p4kek9kop44nke3n7t@4ax.com> <5b10m6ts00bu7shkou40j6pq0gg14tdrnn@4ax.com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-BMwq2T4MdCWEy6yVBYE1TDAxG79RJwXG73+axCQN1k2ptmXWb1dbhL4TrbOxKG00wS/qFAfOSwhmOKe!lLxcr5fLbN+e5f+clVRAPT9ISc0/WheqpIWbnWBeKTQJrfD8e/nJYMYN3xpdgmLDnnBlPQmnExFo!EEQ= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2696 Xref: g2news2.google.com comp.lang.ada:18450 Date: 2011-02-20T10:42:52+00:00 List-Id: On Sat, 19 Feb 2011 18:07:49 +0000, Bill Findlay wrote: > > > >On 19/02/2011 18:02, in article 5b10m6ts00bu7shkou40j6pq0gg14tdrnn@4ax.com, >"Brian Drummond" wrote: > >> On Sat, 19 Feb 2011 14:17:18 +0000, Simon Wright wrote: >> >>> Brian Drummond writes: >>> >>>> Another example : moving an array from local variable (the stack) to >>>> the heap (after I increased its size and hit a stack size limit) meant >>>> I had to refer to it through an access type, instead of >>>> directly. Instead of "my_array(I,J,K)" I was faced with changing every >>>> reference to "my_array_ptr.all(I,J,K)" ... >>> >>> Really? I think that "my_array_ptr(I,J,K)" would have worked .. >> >> I believe you are correct sir! >> Which is even simpler than the rename... > >And if you call the pointer "my_array" you don't need to change anything. Except when I need to pass the array to the procedures which do the work. I could rewrite the procedures to accept pointers ... then the package spec, and the older apps which used the package. But the renamed array worked for all these. (Arguably it's not portable, because another Ada compiler might try passing the whole array by copy... or is that outlawed by the LRM?) - Brian