comp.lang.ada
 help / color / mirror / Atom feed
From: Andreas Kalla <kalla@asrv01.atlas.de>
Subject: Re: How can I qualify the predefined logical operations
Date: 1998/07/17
Date: 1998-07-17T00:00:00+00:00	[thread overview]
Message-ID: <35AF1649.15FB@asrv01.atlas.de> (raw)
In-Reply-To: 6okcnl$n93$1@nnrp1.dejanews.com

Hi!

hoyngj@my-dejanews.com wrote:

> 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
> 

What about this solution:

   function "And" (Left, Right: Private_Type) return Private_Type   is

     Ret_Value : Private_Type := ( others => false ) ;

   begin

        for i in Private_Type'range
        loop
            Ret_Value ( i ) := Left ( i ) and Right ( i ) ;
        end loop ;

        return Ret_Value ;

   end ;


Andreas Kalla
-- __  __
  (_ )( _) mailto:kalla@vossnet.de      or
    \\//   mailto:kalla@asrv01.atlas.de
   _//\\_  I'm Online? look at http://wwp.mirabilis.com/10343510
  (__)(__) http://pages.vossnet.de/kalla




  parent reply	other threads:[~1998-07-17  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Tucker Taft
1998-07-16  0:00 ` dennison
1998-07-16  0:00 ` dennison
1998-07-17  0:00 ` Andreas Kalla [this message]
1998-07-19  0:00   ` Mats Weber
1998-07-25  0:00 ` Matthew Heaney
replies disabled

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