comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com
Subject: Re: Q: how to copy contents and use ancestor's constraints at the same time ?
Date: Tue, 14 Aug 2007 01:59:54 -0700
Date: 2007-08-14T01:59:54-07:00	[thread overview]
Message-ID: <1187081994.658829.233160@d55g2000hsg.googlegroups.com> (raw)
In-Reply-To: <1k4d6t1tg0k3c.jlwrzml5dc38.dlg@40tude.net>

Dmitry:

> What about:
>    subtype Constrained_PF is PF (n1=>1, n2=>2, n3=>3);

> > like when constraining an object by
> > initializing it with a value of the same type ?

>   X : PF := Y; -- ?

Fine, but the contraints are again explicit (=> 1, => 2, => 3) and it
is in two pieces again:  subtype definition and declaration of X.
Indeed, Y being of type PF_Data and not PF, it would require three
lines.
Adam and Jeff's suggestion is exactly what I'm looking for.
Thanks for all the brainstorming and help!
______________________________________________________________
Gautier         -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!




      reply	other threads:[~2007-08-14  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 21:16 Q: how to copy contents and use ancestor's constraints at the same time ? Gautier
2007-08-13 21:33 ` Adam Beneschan
2007-08-14  0:48   ` Jeffrey R. Carter
2007-08-14 23:35     ` Adam Beneschan
2007-08-14  7:45 ` Dmitry A. Kazakov
2007-08-14  8:59   ` gautier_niouzes [this message]
replies disabled

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