comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: ObjectAda: LPCSTR -> STRING ?
Date: 1998/01/06
Date: 1998-01-06T00:00:00+00:00	[thread overview]
Message-ID: <dewar.884108955@merv> (raw)
In-Reply-To: 34B24858.9DB@erols.com


Robin said

<<         (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.





  reply	other threads:[~1998-01-06  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-05  0:00 ObjectAda: LPCSTR -> STRING ? matthew_snyder
1998-01-06  0:00 ` Martin C. Carlisle
1998-01-11  0:00   ` Jerry van Dijk
1998-01-12  0:00   ` Pascal Obry
1998-01-06  0:00 ` Robin Stephe Nora
1998-01-06  0:00   ` Robert Dewar [this message]
1998-01-07  0:00     ` Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
1998-01-20  0:00 matthew_snyder
1998-01-21  0:00 ` Pascal Obry
replies disabled

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