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,fd037befc4df6bdc X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: ObjectAda: LPCSTR -> STRING ? Date: 1998/01/07 Message-ID: <34B3A107.76DC@erols.com>#1/1 X-Deja-AN: 313638298 Content-Transfer-Encoding: 7bit References: <884055877.1213464581@dejanews.com> <34B24858.9DB@erols.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@erols.com X-Trace: winter.news.erols.com 884187440 25328 207.172.138.69 (7 Jan 1998 15:37:20 GMT) Organization: LeakyStain Mime-Version: 1.0 Reply-To: leakstan@erols.com Newsgroups: comp.lang.ada Date: 1998-01-07T00:00:00+00:00 List-Id: Robert Dewar wrote: > > Robin said Actually, I'm Stephe; my mailer is confused. > > << (LpSection => C_Section (C_Section'First)'address, > LpKeyName => System.Null_Address, > LpString => C_Section (C_Section'First)'Address, > LpFileName => C_File (C_File'First)'Address); > >> > > Note that for any compiler following the implementation advice in the RM > (all currently available Ada 95 compilers do so), the use of the > X'First subscript here is obfuscation. In fact there is no real reason > to suppose that it will work any better than simply saying > C_File'Address, since neither is really guaranteed to work in an absolute > semantic sense, and in practice they are interchangable. > > I think it is reasonable to avoid FUD about compilers not doing the > sensible thing if that FUD results in obscuring the code. Ok, I'll change the code. This was a hold-over from the Ada 83 idiom, where the advice I got was that 'address might return the address of the descriptor in some compilers. One more place where I should have read the relevant Ada 95 RM first! -- Stephe