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!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: How can I create an empty array of a generic type? Date: Sun, 14 Jul 2019 14:49:17 +0200 Organization: Adalog Message-ID: References: <5f53e122-6b99-48ca-b6cc-4ae43c0a2221@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 14 Jul 2019 12:49:14 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="62e55e7f3a2ba4c3181533972f8f8471"; logging-data="32562"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185ra8/LAiiBXIbjmEdfwMv" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 Cancel-Lock: sha1:9Ti1064iZg3fCuf9SNwvdzjhbGU= In-Reply-To: Content-Language: fr Openpgp: preference=signencrypt Xref: reader01.eternal-september.org comp.lang.ada:56874 Date: 2019-07-14T14:49:17+02:00 List-Id: Le 14/07/2019 à 13:15, reinert a écrit : > lørdag 13. juli 2019 07.24.10 UTC+2 skrev J-P. Rosen følgende: > ..... >> You can avoid it: >> Empty_Key : constant Key_Type(1..0) := (others => <>); >> > > But Key_Type is an array indexed by Positive (> 0). > The zero in "Key_Type(1..0)" is not so intuitive for me (outside the range) ? > > reinert > A null range is always compatible, even if the bounds do not belong to the subtype. 3.5(8). -- 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