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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec1a210f9e3b089e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-07 14:51:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.xtra.co.nz!53ab2750!not-for-mail From: "AG" Newsgroups: comp.lang.ada References: <665e587a.0306071258.1a8711cc@posting.google.com> Subject: Re: Ranges and discriminant constraints X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Sun, 8 Jun 2003 09:51:55 +1200 NNTP-Posting-Host: 219.88.60.225 X-Complaints-To: newsadmin@xtra.co.nz X-Trace: news.xtra.co.nz 1055022663 219.88.60.225 (Sun, 08 Jun 2003 09:51:03 NZST) NNTP-Posting-Date: Sun, 08 Jun 2003 09:51:03 NZST Organization: Xtra Xref: archiver1.google.com comp.lang.ada:38794 Date: 2003-06-08T09:51:55+12:00 List-Id: "Vadim Godunko" wrote in message news:665e587a.0306071258.1a8711cc@posting.google.com... > Does anybody explain me why language allow constraint discriminant of > discrete type to some value, but not allow constraint to range? If I understood you correctly you mean something like this: [?] type abc is (a, b, c); type test(y: abc) is record ... z: test(a); -- Which compiles vs z: test(a..c); -- Which doesn't Assuming I did understand you correctly, what would that construct do? The whole point of a discriminant value is to select one option out of available set. Ranges as such are not true values in Ada (you could do a search for a thread awhile back which discussed arrays of "nothings" which existed solely for the purpose of passing their slices around just to implement the ranges as variables).