comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Johnson <mark_h_johnson@raytheon.com>
Subject: Re: Specification does not compile
Date: Mon, 04 Jun 2001 17:18:41 -0500
Date: 2001-06-04T17:18:41-05:00	[thread overview]
Message-ID: <3B1C0941.71155BD3@raytheon.com> (raw)
In-Reply-To: 9fg03c$pmq$2@wanadoo.fr

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





  reply	other threads:[~2001-06-04 22:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-04 12:50 Specification does not compile daniel gaudry
2001-06-04 22:18 ` Mark Johnson [this message]
2001-06-04 23:21   ` Keith Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox