From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: "unconstrained subtype in component declaration" vs "discriminant in constraint must appear alone" Date: Mon, 22 Feb 2021 16:11:21 +0100 Organization: Adalog Message-ID: References: <4086f350-c56b-4eec-91d3-ef685230b011n@googlegroups.com> <67ea71d9-489a-4802-9cf0-d955f6ecce62n@googlegroups.com> <0e88c615-6a53-4392-b83d-581c59473c88n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 22 Feb 2021 15:11:22 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="e9beaac18cbb11fa3083b7c2ec09b13f"; logging-data="11370"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Q1xTTnBNr/BlyrcbjM1Kq" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cancel-Lock: sha1:8hh2uG66pYZiPk6fhcLNBuehEDw= In-Reply-To: <0e88c615-6a53-4392-b83d-581c59473c88n@googlegroups.com> Content-Language: fr Xref: reader02.eternal-september.org comp.lang.ada:61416 List-Id: Le 22/02/2021 à 15:20, Mehdi Saada a écrit : > I just intend to initialize the value once and done. It is a default value, not a dynamic predicate. Then: Set: constant Sets_of_Card := INITIALIZATION (Nb); You don't need to specify the discriminants if it can be inherited from the initial value. And of course, if it doesn't change, it should be declared as a constant. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr