comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian_drummond@btconnect.com>
Subject: Re: Need some light on using Ada or not
Date: Sun, 20 Feb 2011 10:42:52 +0000
Date: 2011-02-20T10:42:52+00:00	[thread overview]
Message-ID: <jor1m6h043jggo90k51ar76rs1deu1dt8t@4ax.com> (raw)
In-Reply-To: C985B775.6CCC%news@findlayw.plus.com

On Sat, 19 Feb 2011 18:07:49 +0000, Bill Findlay <news@findlayw.plus.com> wrote:

>
>
>
>On 19/02/2011 18:02, in article 5b10m6ts00bu7shkou40j6pq0gg14tdrnn@4ax.com,
>"Brian Drummond" <brian_drummond@btconnect.com> wrote:
>
>> On Sat, 19 Feb 2011 14:17:18 +0000, Simon Wright <simon@pushface.org> wrote:
>> 
>>> Brian Drummond <brian_drummond@btconnect.com> 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



  reply	other threads:[~2011-02-20 10:42 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 22:52 Need some light on using Ada or not Luis P. Mendes
2011-02-18 23:58 ` Georg Bauhaus
2011-02-19 14:25   ` Simon Wright
2011-02-19  0:20 ` Edward Fish
2011-02-20  0:13   ` Luis P. Mendes
2011-02-20  1:36     ` Marc A. Criley
2011-02-20  9:59     ` mockturtle
2011-02-20 10:37     ` Brian Drummond
2011-02-20 11:08     ` Ludovic Brenta
2011-03-01  8:10     ` Adrian Hoe
2011-03-01  8:29       ` Thomas Løcke
2011-03-04 13:34         ` Adrian Hoe
2011-02-19  8:43 ` Vadim Godunko
2011-02-19 13:07 ` Brian Drummond
2011-02-19 14:17   ` Simon Wright
2011-02-19 18:02     ` Brian Drummond
2011-02-19 18:07       ` Bill Findlay
2011-02-20 10:42         ` Brian Drummond [this message]
2011-02-19 14:36   ` Georg Bauhaus
2011-02-19 18:25     ` Brian Drummond
2011-02-20 14:34       ` Brian Drummond
2011-02-20 15:45         ` jonathan
2011-02-20 16:18           ` Brian Drummond
2011-02-20 19:49           ` Pascal Obry
2011-02-20 19:57             ` Brian Drummond
2011-02-20 20:10               ` jonathan
2011-02-20 21:15                 ` Pascal Obry
2011-02-20 21:26                   ` Vinzent Hoefler
2011-02-20 21:33                     ` Vinzent Hoefler
2011-02-20 21:36                     ` Pascal Obry
2011-02-20 21:50                       ` Vinzent Hoefler
2011-02-20 22:18                   ` jonathan
2011-02-20 22:47               ` Simon Wright
2011-02-21 12:52                 ` Brian Drummond
2011-02-21 13:44                   ` Simon Wright
2011-02-24  0:19                     ` Brian Drummond
2011-02-24  7:41                       ` Jacob Sparre Andersen
2011-02-22  2:15                   ` Shark8
2011-02-20 16:42       ` jonathan
2011-02-20 20:02         ` Brian Drummond
2011-02-20  0:20   ` Luis P. Mendes
2011-02-20 10:50     ` Brian Drummond
2011-02-20 19:54     ` Brian Drummond
2011-02-23 22:19       ` Luis P. Mendes
2011-02-24 17:06         ` Brian Drummond
2011-02-27 17:51           ` Luis P. Mendes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox