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.7 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88093378be1184d4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-07 04:55:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: A question and a request Date: Wed, 7 Nov 2001 06:54:21 -0600 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1005137715 39902 137.194.161.2 (7 Nov 2001 12:55:15 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 7 Nov 2001 12:55:15 +0000 (UTC) Cc: "Dale Stanbrough" , , To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:15985 Date: 2001-11-07T06:54:21-06:00 ----- Original Message ----- From: "Preben Randhol" Newsgroups: comp.lang.ada To: Sent: November 07, 2001 5:00 AM Subject: Re: A question and a request > Use type not subtype if you do not want the above behavior. Read > below (taken from: > http://goanna.cs.rmit.edu.au/~dale/ada/aln/4_basic_types.htmli ) > > Subtypes > > We can restrict the range of values a variable can take by declaring a > subtype with a restricted range of values (this corresponds to Pascal's > user defined types). Any attempt to place an out-of-range value into a > variable of a subtype results in an exception (program error). In this > way program errors can be discovered. The syntax for a subtype > declaration is > The above paragraph is simply wrong. The excetpion which will be raised is not Program_Error, but Constraint_Error. As a further note to Dale (the prsumed author of the linked website), there are spelling errors in the commentary on those pages.