comp.lang.ada
 help / color / mirror / Atom feed
* How can I qualify the predefined logical operations
@ 1998-07-16  0:00 hoyngj
  1998-07-16  0:00 ` hoyngj
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: hoyngj @ 1998-07-16  0:00 UTC (permalink / raw)


I have the following problem, when trying to implement a function "and".

 package Some_Package is
   type Private_Type is private;
   function "And" (Left, Right: Private_Type) return Private_Type ;
 private
   type Private_Type is array (0 .. 1023) of Boolean;
 end Some_Package;


-- I want to implement Some_Package."And" using the predefined logical
-- operation "And" for any one-dimensional array type whose components
-- are of a boolean type.
 package body Some_Package is
   function "And" (Left, Right: Private_Type) return Private_Type   is
   begin
     return Left and Right;  -- ERROR: AND is here Some_Package."AND",
                             -- endless recursive
   end "and";
 end Some_Package;

To fix the error in the implementation above, I need to qualify the
predefined "And" operation:


 package body Some_Package is
   function "And" (Left, Right: Private_Type) return Private_Type is
   begin
     return Standard."And" (Left, Right);  -- ERROR: not possible
   end "and";
 end Some_Package;

How is it possible to qualify the predefined logical operations to
distinguish between Some_Package."and" and the predefined "and"?

Thanks in advance

--
Juergen Hoyng,  RIO 62             |   email : Juergen.Hoyng@ri.dasa.de
DASA/RI                            |   fax   : +49 421 539 4529
Postfach 286156                    |   voice : +49 421 539 5348
D-28361 Bremen                     |   Germany







-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




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

end of thread, other threads:[~1998-07-25  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-16  0:00 How can I qualify the predefined logical operations hoyngj
1998-07-16  0:00 ` hoyngj
1998-07-17  0:00   ` Robert Dewar
1998-07-16  0:00 ` Anonymous
1998-07-16  0:00 ` dennison
1998-07-16  0:00 ` Tucker Taft
1998-07-16  0:00 ` dennison
1998-07-17  0:00 ` Andreas Kalla
1998-07-19  0:00   ` Mats Weber
1998-07-25  0:00 ` Matthew Heaney

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