comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: Initialized global data
Date: 1998/05/11
Date: 1998-05-11T00:00:00+00:00	[thread overview]
Message-ID: <x7vaf8o4mkp.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: dewar.894849713@merv


dewar@merv.cs.nyu.edu (Robert Dewar) writes:

> Simon says
> 
> <<I saw (searching the AARM for 'implicit initialization' and 'default
> initialization') that a pragma Import would do the trick but I must
> say it never occured to me to do this!
> >>
> 
> No need to rummage around in the AARM here, the rule is quite clear
> and explicit in the RM (B.1(24))
> 
> 24   The declaration of an imported object shall not include an explicit
> initialization expression.  Default initializations are not performed.

My AARM is more searchable than my RM.

Yes, I saw that clause, indeed that was the point of "a pragma Import
would do the trick", what I meant was that

  I : Integer;
  pragma Import (Ada, I);  -- prevent default initialization
  for I'Address use ...

is (IMHO) a non-obvious construction! (but thanks very much to all
who've helped).

There are just so many idioms in Ada, do we have a budding Coplien?




  reply	other threads:[~1998-05-11  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-05  0:00 Initialized global data Kevin Wells
1998-05-05  0:00 ` A little more data Kevin Wells
1998-05-06  0:00   ` Stephen Leake
1998-05-06  0:00 ` Initialized global data Tucker Taft
1998-05-06  0:00 ` John English
1998-05-06  0:00 ` Anonymous
1998-05-08  0:00   ` Simon Wright
1998-05-08  0:00     ` Tucker Taft
1998-05-09  0:00       ` Simon Wright
1998-05-10  0:00         ` Robert Dewar
1998-05-11  0:00           ` Simon Wright [this message]
1998-05-11  0:00             ` Matthew Heaney
1998-05-09  0:00 ` Niklas Holsti
replies disabled

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