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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a23f8a36ba44aa8b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-04 15:18:43 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3B1C0941.71155BD3@raytheon.com> From: Mark Johnson Reply-To: mark_h_johnson@raytheon.com X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Specification does not compile References: <9fg03c$pmq$2@wanadoo.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 04 Jun 2001 17:18:41 -0500 NNTP-Posting-Host: 192.27.48.41 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 991693122 192.27.48.41 (Mon, 04 Jun 2001 17:18:42 CDT) NNTP-Posting-Date: Mon, 04 Jun 2001 17:18:42 CDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:8102 Date: 2001-06-04T17:18:41-05:00 List-Id: daniel gaudry wrote: > -- > [snip] > Daniel.GAUDRY Ph.D. > 9 Av CALMELS > 92270 Bois Colombes > France > +336 64 19 50 09 > Daniel.Gaudry@wanadoo.fr > > Please find below specification (w.ads) and corresponding files . I do > not see any error left but cannot have it compiled. > Can somebody please let me know what can be wrong. > I assume you are using gnat to isolate the problem. Also - if you post code in the future, try using attachments. The copy I got had several of the comment lines wrapped (which broke the program...) > [snip] > if Search_Result = Found > then > Temporary_Tree.The_Data.all := > Tagged_Data_Type'Class'(with_The_Data); > Result_Code := Success; > else > Result_Code := Not_Found; > end if; The compiler complains about the statement... Temporary_Tree.The_Data.all := Tagged_Data_Type'Class'(with_The_Data); with the following error message... w.ads:19:06: instantiation error at poly_bin_tree.adb:148 w.ads:19:06: controlling argument is not dynamically tagged which can be simplified to... Temporary_Tree.The_Data.all := with_The_Data; which compiles OK. I am not quite sure why the qualified expression didn't work. --Mark