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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3f98e6e972d5862d,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-15 14:54:24 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!gumby!yale!yale!mcculley From: mcculley@greatwall.cctt.com (Gene McCulley) Newsgroups: comp.lang.ada Subject: defaults on discriminants Date: 15 Nov 1994 22:54:24 GMT Organization: CCTT, Orlando, FL Message-ID: <3abe70$o5d@babyblue.cs.yale.edu> NNTP-Posting-Host: greatwall.cctt.com Date: 1994-11-15T22:54:24+00:00 List-Id: The following compiles fine under LegacyAda 1.4.0 and GNAT but does not under Rational Apex 1.4.1 on the RS/6000: procedure Dummytest is type Integer_Array is array (Natural range <>) of Integer; type Foo_Record_Type (Count1 : Natural := 1) is record Things : Integer_Array (1 .. Count1); end record; My_Foo : Foo_Record_Type (5); begin My_Foo.Things (1) := 5; end Dummytest; !!! [MID] Program will raise CONSTRAINT_ERROR (Range_Error) at "type FOO_RECORD_TYPE (COUNT1 : NATURAL := 1) is " (DUMMYTEST'BODY.2D) The Apex generated executable says: Exception CONSTRAINT_ERROR (Range_Error) raised and then shows the type definition for Foo_Record_Type in the debugger. Apex compiles this fine if I give no default for the discriminant. Shouldn't I be able to give it a default?