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.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site decwrl.DEC.COM Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!dec-rhea!dec-katie!cook From: cook@katie.DEC (Neil on 225-7155) Newsgroups: net.lang.ada Subject: CONSTRAINT ERROR raised at runtime Message-ID: <640@decwrl.DEC.COM> Date: Wed, 22-Jan-86 22:27:11 EST Article-I.D.: decwrl.640 Posted: Wed Jan 22 22:27:11 1986 Date-Received: Fri, 24-Jan-86 21:33:17 EST Sender: daemon@decwrl.DEC.COM Organization: Digital Equipment Corporation List-Id: > LNTH : NATURAL range 1..8 := 0; In the index of ANSI/MIL-STD-1815A-1983 (The Programming Language Ada Reference Manual), under the entry CONSTRAINT_ERROR, is a reference to "raised by the initialization of an object 3.2.1". In that section, paragraph 16, it says "The initialization of an object ... checks that the initial value belongs to the subtype of the object ... The exception CONSTRAINT_ERROR is raised if this check fails." I take "The initialization..." to be a reference to the run-time behaviour. Since the run-time environment raises CONSTRAINT_ERROR, I think the compiler behaves correctly. Of course, if your question was "Why is Ada not defined differently?", rather than why does the compiler not complain, I would not pretend to know the answer. My experience is that these questions always have good, but not obvious, answers. Neil Cook Of course, these are my opinions, and nothing to do with anyone else. DEC Ada is nothing to do with me. DEC and Ada are trademarks of DEC and The United States Government, Department of Defense, Under Secretary for Research and Engineering, respectively.