comp.lang.ada
 help / color / mirror / Atom feed
* Types vs subtypes
@ 2000-08-28  2:47 Alex Angas
  2000-08-28  0:00 ` Richard Riehle
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Angas @ 2000-08-28  2:47 UTC (permalink / raw)


I've been given an Ada project to work on and I'm trying to work out what
the difference between using a type or subtype is. Why is myarray an array
of st, instead of just making it an array of t in the following declaration?

 type enum is ( red, green, blue ) ;
 type t is array( enum ) of natural ;
 subtype st is t;
 type myarray is array( enum ) of st;

They both seem to compile the same. What am I missing?

Thanks for your help,
Alex.






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

end of thread, other threads:[~2000-08-29  6:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-28  2:47 Types vs subtypes Alex Angas
2000-08-28  0:00 ` Richard Riehle
2000-08-29  0:00   ` Marc A. Criley
2000-08-29  0:00     ` Jean-Pierre Rosen
2000-08-29  6:06   ` Preben Randhol

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