comp.lang.ada
 help / color / mirror / Atom feed
* Ambiguous expressions - Help!
@ 2013-09-24 17:38 Mike H
  2013-09-24 18:15 ` Eryndlia Mavourneen
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Mike H @ 2013-09-24 17:38 UTC (permalink / raw)


package Foo1 is
   type grid_index_type  is new integer range 0..80;
   type grid_type is array (grid_index_type range <>) of character;
   subtype Vector_type is grid_type (0 .. 8);
... etc.

with Foo1;
package Foo2 is
   procedure Put_line (Item : in Foo1.Vector_type);
   procedure Put_line (Item : in string);
... etc.

with Foo1; use Foo1;
with Foo2;
procedure Foo3 is
   Foo_thing : Vector_type;
begin
... etc.
   Foo2.Put_line (Foo_thing);
... etc.
   Foo2.Put_line ("Something else");
... etc.
end Foo3;

Compilation of Foo3 raises error messages of the form "ambiguous
expression (cannot resolve "Put_line")

I find it hard to believe that the compiler cannot distinguish between a
string and an array of characters. What am I doing wrong?
-- 
Mike
Swim? Naturally at Severn Vale
<http://www.severnvalesc.org/>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-25  7:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-24 17:38 Ambiguous expressions - Help! Mike H
2013-09-24 18:15 ` Eryndlia Mavourneen
2013-09-24 18:43   ` Adam Beneschan
2013-09-24 20:34     ` Robert A Duff
2013-09-24 18:37 ` Jeffrey Carter
2013-09-24 21:08 ` Georg Bauhaus
2013-09-25  7:14 ` Mike H

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