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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!crdgw1!uunet!microsoft!jamesth From: jamesth@microsoft.UUCP (James THIELE) Newsgroups: comp.lang.ada Subject: Re: constraint error question for language lawyers Message-ID: <59445@microsoft.UUCP> Date: 30 Nov 90 16:02:32 GMT References: <9011091437.AA20896@ajpo.sei.cmu.edu> Reply-To: jamesth@microsoft.UUCP (James THIELE) Organization: Microsoft Corp., Redmond WA List-Id: In article <9011091437.AA20896@ajpo.sei.cmu.edu> NCOHEN@IBM.COM ("Norman H. Cohen") writes: | Alex Blakemore asks why, given the declarations | | type Short is range 0 .. 10; | type Data is array (Short range <>) of Character; | type Var_Text (Len : Short := 0) is | record | Text : Data (1 .. Len); | end record; | Dummy : Var_Text; -- unconstrained | | the statements | | Dummy := (Len => 0, Text => ""); | Dummy := (Len => Dummy.Len + 1, | Text => Dummy.Text & 'a'); | | raise Constraint_Error in the second assignment. | [62 lines of "legalese" deleted] When I worked with Ada, it always seemed that the manual was like the "Colossal Cave" -- you always had to go several places to get what you needed. But my favorite comment always was: "Ada is PASCAL for lawyers." James Thiele microsoft!jamesth