comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: How can I create an empty array of a generic type?
Date: Sun, 14 Jul 2019 14:49:17 +0200
Date: 2019-07-14T14:49:17+02:00	[thread overview]
Message-ID: <qgf8c9$vpi$1@dont-email.me> (raw)
In-Reply-To: <a17e8dbe-6785-4b09-b9c6-e50164d10062@googlegroups.com>

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


  parent reply	other threads:[~2019-07-14 12:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13  3:36 How can I create an empty array of a generic type? b.mcguinness747
2019-07-13  4:11 ` Keith Thompson
2019-07-13  5:24   ` J-P. Rosen
2019-07-13 21:19     ` Keith Thompson
2019-07-14 11:09       ` reinert
2019-07-14 11:15     ` reinert
2019-07-14 11:27       ` Jeffrey R. Carter
2019-07-14 12:49       ` J-P. Rosen [this message]
2019-07-13 21:02 ` b.mcguinness747
2019-07-14 16:41   ` bj.mooremr
2019-10-16  2:03     ` Andrew Shvets
2019-10-16  4:49       ` Egil H H
replies disabled

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