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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1fd537a3da8a5021 X-Google-Attributes: gid103376,public From: "Ken Garlington" Subject: Re: Array access via pointer? Date: 2000/08/03 Message-ID: <8ami5.2464$SB4.219190@news.flash.net>#1/1 X-Deja-AN: 654199659 References: <398721AD.CAEE3A51@home.com> <8m7hn1$i4r$1@nnrp1.deja.com><3988269B.D1DB4EA5@home.com> <813i5.1869$SB4.159422@news.flash.net> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 965340932 216.215.70.28 (Thu, 03 Aug 2000 17:15:32 CDT) Organization: FlashNet Communications, http://www.flash.net X-MSMail-Priority: Normal NNTP-Posting-Date: Thu, 03 Aug 2000 17:15:32 CDT Newsgroups: comp.lang.ada Date: 2000-08-03T00:00:00+00:00 List-Id: "Robert A Duff" wrote in message news:wcc66pi304z.fsf@world.std.com... > "Ken Garlington" writes: > > > "Michael Carman" 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.)