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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fbb2432d0a728c1b X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: help with pointerproblem. Date: 1998/09/11 Message-ID: <35F91FB9.A07A0CF9@elca-matrix.ch>#1/1 X-Deja-AN: 390098801 Content-Transfer-Encoding: 7bit References: <35f7f673.0@newsfeed.uu.se> <35f88e65.0@news.pacifier.com> <6ta4lf$e0b1@onews.collins.rockwell.com> Content-Type: text/plain; charset=us-ascii Organization: ELCA Matrix SA Mime-Version: 1.0 Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada Date: 1998-09-11T00:00:00+00:00 List-Id: Wayne Magor wrote: > Since VertexArray is unconstrained, there will have to be a descriptor > someplace. It's likely the pointer points to the descriptor instead > of the data. I'd prefer to take the 'address of element zero of the > array. Seems to me that's more likely to work across nearly all > platforms. Like this: > > return GLPointer (ToGlPointerPackage.To_Pointer (vPtr(0)'Address)); This (taking the address of the first element instead of the address of the array) is a hack that is not necessary anymore with Ada 95, because the RM now says it has to be the same. return GLPointer (ToGlPointerPackage.To_Pointer (vPtr'Address)); is just fine.