comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Ada 95 Compatibility
Date: 1996/02/24
Date: 1996-02-24T00:00:00+00:00	[thread overview]
Message-ID: <dewar.825179042@schonberg> (raw)
In-Reply-To: 4gmdfs$mdd@newsbf02.news.aol.com

John Herro said

"     Thanks to everyone who replied to my initial question.  Ken's RM
reference provides the best and simplest solution, to add pragma
Elaborate_Body as follows:

package P is
   pragma Elaborate_Body;
   Buffer : array(1 .. 50) of Integer;
end P;

package body P is
begin
   -- code to initialize Buffer
end P;

Yes, that's certainly fine in Ada 95. If you want to stay Ada 83
compatible, then a method which works in both 83 and 95 is

package P is
   Buffer ...
private
   type Requires_Body;
end P;

then in the body you give a dummy completion for the incomplete type.





  reply	other threads:[~1996-02-24  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-22  0:00 Ada 95 Compatibility John Herro
1996-02-22  0:00 ` Mark A Biggar
1996-02-23  0:00   ` PHILIP W. BRASHEAR
1996-02-23  0:00 ` Ken Garlington
1996-02-24  0:00   ` John Herro
1996-02-24  0:00     ` Robert Dewar [this message]
1996-02-26  0:00       ` Ken Garlington
1996-02-26  0:00         ` Robert Dewar
1996-02-26  0:00         ` Robert Dewar
1996-02-23  0:00 ` Keith Thompson
1996-02-23  0:00 ` Peter Amey
replies disabled

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