From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2bbd7f65ab12f156 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!d55g2000hsg.googlegroups.com!not-for-mail From: gautier_niouzes@hotmail.com Newsgroups: comp.lang.ada 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 Organization: http://groups.google.com Message-ID: <1187081994.658829.233160@d55g2000hsg.googlegroups.com> References: <46c0c9e8$1_3@news.bluewin.ch> <1k4d6t1tg0k3c.jlwrzml5dc38.dlg@40tude.net> NNTP-Posting-Host: 206.122.158.4 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1187081994 12875 127.0.0.1 (14 Aug 2007 08:59:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 14 Aug 2007 08:59:54 +0000 (UTC) In-Reply-To: <1k4d6t1tg0k3c.jlwrzml5dc38.dlg@40tude.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.1),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: d55g2000hsg.googlegroups.com; posting-host=206.122.158.4; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1440 Date: 2007-08-14T01:59:54-07:00 List-Id: 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!