Re: limited types (Was: Records that could be arrays)



On 27 Feb 2006 15:00:29 -0800, Matthew Heaney wrote:

Dmitry A. Kazakov wrote:

I don't see how a constraint imposed on elements can propagate to the
cursor.

generic
type ET is private;
type Cursor is private;

with function E (C : Cursor) return ET is <>;
...
procedure Generic_Algorithm (C1, C2 : CT);

Instantiate Generic_Algorithm with some T and CT. Then put a constraint on
T, that will be a subtype S or a derived type. Now how to get CS from CT?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.