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=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8276b2994037cd71,start X-Google-Attributes: gid103376,public From: Philippe Torres Subject: disjoint ranges ? Date: 2000/10/12 Message-ID: <39E612C9.9BF98CD3@laas.fr>#1/1 X-Deja-AN: 680702112 Content-Transfer-Encoding: 7bit X-Accept-Language: fr-FR,en Content-Type: text/plain; charset=us-ascii X-Complaints-To: postmaster@cict.fr X-Trace: news.cict.fr 971379400 2401 140.93.144.128 (12 Oct 2000 19:36:40 GMT) Organization: Inconnue Mime-Version: 1.0 NNTP-Posting-Date: 12 Oct 2000 19:36:40 GMT Newsgroups: comp.lang.ada Date: 2000-10-12T19:36:40+00:00 List-Id: A very dumb question but i can't find the right syntax so here i am. How can i declare a type or subtype with a disjoint range ? Example : If i declare : --- type Hours is new Integer range 0 .. 23 ; -- i would like a --- subtype Lunch_Hours is Hours range 7..9 & 12..14 & 19..21 ; --- I know this syntax is totally incorrect but i would like to avoid enumerations since : 1- enumeration types don't accept elements named as numeric literals. I can't define : type Lunch_hours is (7,8,9,12,13,...); 2- if my range are big, i am in trouble. Does someone have an idea ? Thanks in advance Philippe