comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: static objects in ADA
Date: 1999/04/25
Date: 1999-04-25T00:00:00+00:00	[thread overview]
Message-ID: <m31zh8o5om.fsf@mheaney.ni.net> (raw)
In-Reply-To: YsRFDEAtZbH3EwNc@tioman.demon.co.uk

Mark Elson <mark@tioman.demon.co.uk> writes:

> Is there an equivalent declaration (in ADA 95) to the static used in
> C++, i.e. so that objects are created at link time rather than at run
> time?

Declare the objects in a static scope (ie package spec or body), without
giving them a default value, and declare the package using pragma
Preelaborate.

package P is
  pragma Preelaborate;
  X : Integer;
end P;









      parent reply	other threads:[~1999-04-25  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-21  0:00 static objects in ADA Mark Elson
1999-04-21  0:00 ` dennison
1999-04-21  0:00 ` Marin David Condic
1999-04-21  0:00 ` Stephen Leake
1999-04-22  0:00 ` Samuel Mize
1999-04-25  0:00   ` Mark Elson
1999-04-25  0:00     ` Robert Dewar
1999-04-26  0:00     ` dennison
1999-04-26  0:00       ` Robert Dewar
1999-05-07  0:00     ` Mark Elson
1999-05-07  0:00       ` dennison
1999-04-25  0:00 ` Matthew Heaney [this message]
replies disabled

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