comp.lang.ada
 help / color / mirror / Atom feed
* Ada 83 - Rep clause inside private area question
@ 1997-04-18  0:00 Angelo A. Keene
  1997-04-20  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 3+ messages in thread
From: Angelo A. Keene @ 1997-04-18  0:00 UTC (permalink / raw)




If I have two Ada83 packages, defined as follows -- what are the 
differences between the two, if any?  Would a user of this package
not have access to the 'SIZE function now?

package Test_Types_One is

   Type My_Enum is (
      Alpha,
      Beta,
      Gamma
   );

   for My_Enum use (
      Alpha => 5,
      Beta  => 7,
      Gamma => 10,
   )

   for My_Enum'SIZE use 16;

end Test_Types_One;

package Test_Types_Two is

   Type My_Enum is (
      Alpha,
      Beta,
      Gamma
   );

private

   for My_Enum use (
      Alpha => 5,
      Beta  => 7,
      Gamma => 10,
   )

   for My_Enum'SIZE use 16;

end Test_Types_Two;

While building a short test package, I accidentally ended up with a
package in the second form, which compiles successfully -- but after
looking at it, I started thinking about the implications of what I
wrote -- looking at my available references, I can't determine
if the second form would have any useful meaning or not.

TIA for any insights!

Angelo A. Keene
akeene@hercii.mar.lmco.com




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

end of thread, other threads:[~1997-04-20  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-18  0:00 Ada 83 - Rep clause inside private area question Angelo A. Keene
1997-04-20  0:00 ` Matthew Heaney
1997-04-20  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