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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2f63c66b1f04412d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-17 09:36:50 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: How to define an array of a variant record type? Date: 17 Nov 2003 12:35:34 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: shevek.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1069090786 12006 128.183.235.101 (17 Nov 2003 17:39:46 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 17 Nov 2003 17:39:46 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:2576 Date: 2003-11-17T17:39:46+00:00 List-Id: Harald Schmidt writes: > type Name_Value_Type is (String_Type, > Integer_Type, > Float_Type); > > type Name_Value(Value_Type : Name_Value_Type) is change this to type Name_Value(Value_Type : Name_Value_Type := String_Type) is This seems very odd, but it works. It says to the compiler "let the discriminant change at runtime". Without the default value for the discriminant, the discriminant is _not_ allowed to change at runtime; it must be known at compile time. -- -- Stephe