From: ada_student@yahoo.com
Subject: types and subtypes
Date: 13 Mar 2006 04:07:57 -0800
Date: 2006-03-13T04:07:57-08:00 [thread overview]
Message-ID: <1142251677.837212.109000@i39g2000cwa.googlegroups.com> (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?
next reply other threads:[~2006-03-13 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 12:07 ada_student [this message]
2006-03-13 13:20 ` types and subtypes 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox