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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Creating a generic package with and setting its type to that of a record Date: Tue, 27 Sep 2016 19:08:59 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 28 Sep 2016 02:08:50 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6df4b173985f7c5c043cea362c370ff7"; logging-data="13995"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iQ3USdPrYPb4AiW8AOhsZ7I8k3epIE14=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 In-Reply-To: Cancel-Lock: sha1:B86Qhv4tJAtVfCyuRQf3XAo0NgA= Xref: news.eternal-september.org comp.lang.ada:31912 Date: 2016-09-27T19:08:59-07:00 List-Id: On 09/27/2016 06:02 PM, Andrew Shvets wrote: > Lets say I have this code: > > > generic > type Custom_Record_Type is <>; > package Gener is > ... > > > What I'd like to do is set the type to that of a record (which has some overloaded operators, such as >, < and =.) Can this be done? If so, how? This is an invalid generic formal type definition, so you can't do anything with it. -- Jeff Carter "I did not rob a bank. If I'd robbed a bank, everything would be great. I tried to rob a bank, is what happened, and they got me." Take the Money and Run 139