comp.lang.ada
 help / color / mirror / Atom feed
* Renaming of enumeration constant
@ 2004-06-10 15:37 Xenos
  2004-06-10 17:38 ` Nick Roberts
  2004-06-12  4:01 ` Robert I. Eachus
  0 siblings, 2 replies; 8+ messages in thread
From: Xenos @ 2004-06-10 15:37 UTC (permalink / raw)


Just a curiosity question:

What is the difference (advantages, etc.) of defining a function rename for
an enumeration constant over just creating a constant.  Consider:

package X is
  type E is (A, B, C);
end X;

with X;
package Y is
   function A return X.E renames X.A;
end Y;

with X;
package Z is
  A : constant X.E := X.A;
end Z;

Is the "A" in Y treated any different than the "A" in Z by the compiler, or
will both achieve the same results.  Is one considered "better" (whatever
that means) than the other?

Thanks,

DrX





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

end of thread, other threads:[~2004-06-12  4:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-10 15:37 Renaming of enumeration constant Xenos
2004-06-10 17:38 ` Nick Roberts
2004-06-10 20:40   ` Xenos
2004-06-11  9:25   ` Jean-Pierre Rosen
2004-06-11 12:00     ` Nick Roberts
2004-06-11 12:49       ` Dmitry A. Kazakov
2004-06-12  4:34     ` Robert I. Eachus
2004-06-12  4:01 ` Robert I. Eachus

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