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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2fa53692def716b5,start X-Google-Attributes: gid103376,public From: Duncan Sands Subject: null range from 1 element discrete type Date: 1999/11/19 Message-ID: #1/1 X-Deja-AN: 550477640 To: comp.lang.ada@ada.eu.org Content-Type: text/plain; charset="us-ascii" X-Complaints-To: usenet@enst.fr X-Trace: menuisier.enst.fr 943006186 23733 137.194.161.2 (19 Nov 1999 10:09:46 GMT) Organization: ENST, France X-BeenThere: comp.lang.ada@ada.eu.org Mime-Version: 1.0 Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Date: 19 Nov 1999 10:09:46 GMT Newsgroups: comp.lang.ada Date: 1999-11-19T10:09:46+00:00 List-Id: Suppose I have a discrete type (eg an enumeration type) T containing just one element. I would like to define a subtype with a null range. If T had more than one element, I could use T'Last .. T'First, but this won't work here. How to get a null range in this case? As you may guess, I have a generic package that takes a discrete type parameter T, and I want it to work correctly in this degenerate case. At some point the package declares an array type, eg type A is array (T range <>) of Float; and I want to declare a null slice of type A. At this point I run into the above problem... Thanks for any help, Duncan. ---- Laboratoire de Topologie et Dynamique, Batiment 425, Universite de Paris-Sud, 91405 Orsay, France sands@topo.math.u-psud.fr ----