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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f298e2224380e530 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-12 21:51:31 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!freenix!enst.fr!not-for-mail From: "Grein, Christoph" Newsgroups: comp.lang.ada Subject: Re: Disriminant question - Waiting desperately for solution :-( Date: Thu, 13 Mar 2003 06:40:35 +0100 (MET) Organization: ENST, France Message-ID: Reply-To: "Grein, Christoph" , "comp.lang.ada mail to news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1047534658 68406 137.194.161.2 (13 Mar 2003 05:50:58 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 13 Mar 2003 05:50:58 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Authentication-Warning: mail.eurocopter.com: uucp set sender to using -f Content-MD5: ETmZSjcXSm18Bxd0w6llCg== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:35279 Date: 2003-03-13T06:40:35+01:00 From: gautier_niouzes@hotmail.com (Gautier) > > type T_TERM (LEG_TYPE : T_LEG_TYPE := NONE) is > record > case LEG_TYPE is > when DF | TF | LIF | TP => > FIX : T_FIX; > when PPOS | NONE => > null; > end case; > end record; > ... > L_TERM : SERVER_TYPES.T_TERM; > > Well, L_TERM has the discriminant LEG_TYPE = NONE. > Then L_TERM.FIX is a nonsense. This is why... > > L_TERM := (LEG_TYPE => SERVER_TYPES.TF, > FIX => > > ...bombs with a "discriminant error". Fun, isn't it ? No, your analysis is quite wrong. L_Tern is defined without discriminant in this example, so only its _default_ value is None, but it may change. So the assignmant to L_Tern should work. The code snippet is too coarse to come to a conclusion why this error occurs (at least I didn't feel like chasing the error in this mess :-).