comp.lang.ada
 help / color / mirror / Atom feed
From: "Ken Garlington" <Ken.Garlington@computer.org>
Subject: Re: Array access via pointer?
Date: 2000/08/03
Date: 2000-08-03T00:00:00+00:00	[thread overview]
Message-ID: <8ami5.2464$SB4.219190@news.flash.net> (raw)
In-Reply-To: wcc66pi304z.fsf@world.std.com


"Robert A Duff" <bobduff@world.std.com> wrote in message
news:wcc66pi304z.fsf@world.std.com...
> "Ken Garlington" <Ken.Garlington@computer.org> writes:
>
> > "Michael Carman" <mjcarman@home.com> wrote in message
> > news:3988269B.D1DB4EA5@home.com...
> ...
> > > [To further complicate things, I can't use 'Access -- I'm trying to
keep
> > > my code Ada83 compatible -- I know how to work around it, it's just
> > > messier.]
>
> If you want to pass a pointer to an array, pass an access value, not an
> address.  If you're stuck with Ada 83, then you will have to allocate
> the arrays in the heap, using 'new'.

No, you don't have to allocate the arrays in the heap -- so long as you're
willing to accept the risks of converting a System.Address to an access
type! (For the specific example I gave, the risks appear to be low in my
experience.)






  reply	other threads:[~2000-08-03  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-01  0:00 Array access via pointer? Michael Carman
2000-08-01  0:00 ` Ted Dennison
2000-08-02  0:00   ` Michael Carman
2000-08-03  0:00     ` Ken Garlington
2000-08-03  0:00       ` Robert A Duff
2000-08-03  0:00         ` Ken Garlington [this message]
2000-08-04  0:00           ` Robert I. Eachus
2000-08-04  0:00             ` Ken Garlington
2000-08-02  0:00 ` Markku Kotiaho
2000-08-02  0:00 ` tmoran
2000-08-02  0:00   ` Michael Carman
2000-08-02  0:00     ` tmoran
replies disabled

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