comp.lang.ada
 help / color / mirror / Atom feed
* types and subtypes
@ 2006-03-13 12:07 ada_student
  2006-03-13 13:20 ` Jean-Pierre Rosen
  0 siblings, 1 reply; 10+ messages in thread
From: ada_student @ 2006-03-13 12:07 UTC (permalink / raw)


Given,

              subtype Positive is Integer range 1 .. Integer'Last;
              type String is (Positive range <>) of Character;

          the following should be illegal,

              subtype Count_To_Ten is Integer range 1 .. 10;
              subtype Ten_Characters is String (Count_to_Ten);

          and the following should be legal, instead

              subtype Count_To_Ten is Positive range 1 .. 10;
              subtype Ten_Characters is String (Count_to_Ten);

Why is Count_To_Ten allowed to be an Integer even though
the indices of String are declared as Positives?




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

end of thread, other threads:[~2006-03-17  1:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-13 12:07 types and subtypes ada_student
2006-03-13 13:20 ` Jean-Pierre Rosen
2006-03-13 18:08   ` ada_student
2006-03-13 18:17     ` Ed Falis
2006-03-13 19:14     ` Larry Kilgallen
2006-03-13 19:42     ` Martin Krischik
2006-03-13 20:22     ` Wilhelm Spickermann
2006-03-14  8:47     ` Dmitry A. Kazakov
2006-03-14 14:39     ` Jean-Pierre Rosen
2006-03-17  1:24     ` Peter C. Chapin

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