comp.lang.ada
 help / color / mirror / Atom feed
* Re: Preelaborable address clause?
  1999-02-10  0:00 Preelaborable address clause? Rod Chapman
@ 1999-02-10  0:00 ` Niklas Holsti
  1999-02-12  0:00   ` Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Niklas Holsti @ 1999-02-10  0:00 UTC (permalink / raw)


Rod Chapman wrote:
> 
> Does anyone know if it's possible to construct a Pre-Elaborable
> Address representation clause?
> 
> I find that
> 
>   A : Integer
>   for A'Address use System.Storage_Elements.To_Address(16#00001000#);
> 
> if rejected when pragma Preelaboreate is applied to the enclosing
> unit, since To_Address is not a static function (LRM 10.2.1(7))

Probably you already rejected this possibility, but I'll state
it anyway: if System.Address is not a private type on your system,
you could supply a direct literal of that type, instead of a
To_Address conversion. Of course, it would not be portable.

Niklas Holsti
Working at but not speaking for Space Systems Finland Ltd.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Preelaborable address clause?
@ 1999-02-10  0:00 Rod Chapman
  1999-02-10  0:00 ` Niklas Holsti
  0 siblings, 1 reply; 4+ messages in thread
From: Rod Chapman @ 1999-02-10  0:00 UTC (permalink / raw)


Does anyone know if it's possible to construct a Pre-Elaborable
Address representation clause?

I find that

  A : Integer
  for A'Address use System.Storage_Elements.To_Address(16#00001000#);

if rejected when pragma Preelaboreate is applied to the enclosing
unit, since To_Address is not a static function (LRM 10.2.1(7))

 Thanks,  
   Rod Chapman
   Praxis Critical Systems
   rod@praxis-cs.co.uk




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Preelaborable address clause?
  1999-02-10  0:00 ` Niklas Holsti
@ 1999-02-12  0:00   ` Nick Roberts
  1999-02-14  0:00     ` robert_dewar
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Roberts @ 1999-02-12  0:00 UTC (permalink / raw)


Niklas Holsti wrote in message <36C20210.4C8B494B@icon.fi>...
|Rod Chapman wrote:
|>
|> Does anyone know if it's possible to construct a Pre-Elaborable
|> Address representation clause?
|>
|> I find that
|>
|>   A : Integer
|>   for A'Address use System.Storage_Elements.To_Address(16#00001000#);
|>
|> if rejected when pragma Preelaboreate is applied to the enclosing
|> unit, since To_Address is not a static function (LRM 10.2.1(7))
|
|Probably you already rejected this possibility, but I'll state
|it anyway: if System.Address is not a private type on your system,
|you could supply a direct literal of that type, instead of a
|To_Address conversion. Of course, it would not be portable.


But, since System.Storage_Elements.To_Address is implementation-dependent
anyway, portability is not an issue.

I would suggest (to Rod) that if your compiler does have a private
System.Address type (and does not support any other means of supplying a
static address to an address representation clause), you try another
compiler.

|Niklas Holsti
|Working at but not speaking for Space Systems Finland Ltd.

-------------------------------------------
Nick Roberts    "The Prophylactic Didactic"
-------------------------------------------








^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Preelaborable address clause?
  1999-02-12  0:00   ` Nick Roberts
@ 1999-02-14  0:00     ` robert_dewar
  0 siblings, 0 replies; 4+ messages in thread
From: robert_dewar @ 1999-02-14  0:00 UTC (permalink / raw)


In article <7a3qmo$e66$4@plug.news.pipex.net>,
  "Nick Roberts" <Nick.Roberts@dial.pipex.com> wrote:
> I would suggest (to Rod) that if your compiler does have
> a private System.Address type (and does not support any
> other means of supplying a static address to an address
> representation clause), you try another compiler.

Note that the RM specifically recommends (for very good
reasons!) that Address be a private type, so if your
compiler does NOT make it a private type, then it is not
following this advice.

As for a method of supplying a static address, there is
obviously no way of doing this within the language. It may
well be useful to add an implementation dependent attribute
to achieve this effect, but of course use of such an
attribute would most certainly be non-portable (To_Address
is much more portable than Nick implies, it is likely that
on a given architecture it has a predictable portable
effect).

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-02-14  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-10  0:00 Preelaborable address clause? Rod Chapman
1999-02-10  0:00 ` Niklas Holsti
1999-02-12  0:00   ` Nick Roberts
1999-02-14  0:00     ` robert_dewar

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