comp.lang.ada
 help / color / mirror / Atom feed
From: hoyngj@my-dejanews.com
Subject: Re: How can I qualify the predefined logical operations
Date: 1998/07/16
Date: 1998-07-16T00:00:00+00:00	[thread overview]
Message-ID: <6ola80$vhs$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 6okcnl$n93$1@nnrp1.dejanews.com

Thanks for your answers. But I am still a little confused.
Look to the little Ada progam:

procedure And_Test is
   A, B, C : Boolean := True;
   type Boolean_Array is array (0 .. 31) of Boolean;
   X,Y,Z : Boolean_Array := (others => False);
begin
  C := Standard."And" (A,B);
  Z := Standard."And" (X,Y);
end And_Test;

When compiling this program with the Verdix and the Alsys compiler, I
got the following error messages:

Compiler: VADS 6.2.3(c)
OS : Solaris 2.5.1 (Sparc)

   1:procedure And_Test is
   2:   A, B, C : Boolean := True;
   3:   type Boolean_Array is array (0 .. 31) of Boolean;
   4:   X,Y,Z : Boolean_Array := (others => False);
   5:begin
   6:  C := Standard."And" (A,B);
   7:  Z := Standard."And" (X,Y);
A ----------^
A:error: RM 4.5.1: no operator visible for boolean_array "and" boolean_array
   8:end And_Test;

Compiler: Alsys Ada V5.5.4
OS : HP_UX 10.20


        7   Z := Standard."And" (X,Y);
                                 1
 1   **IDE There is a type inconsistency in this expression.

         ======================== More Information ========================
         -> Different interpretations exist for "AND":
            - STANDARD."AND"
                Its profile is: (STANDARD.BOOLEAN; STANDARD.BOOLEAN) return
         STANDARD.BOOLEAN
            - STANDARD."AND"
                Its profile is: (Any boolean array; Any boolean array) return
         Any boolean array
            - STANDARD."AND"
                Its profile is: (Any boolean type; Any boolean type) return
         Any boolean type
         -> But the expression has the following type(s):
            - AND_TEST.BOOLEAN_ARRAY at line 3, an array type of STANDARD.
         BOOLEAN
         ==================================================================


Both compiler say line 6 is o.k. but not line 7. I am totally confused about
the error message of the Alsys compiler saying there is a STANDARD."AND"
for "any boolean array". But why does Alsys generate an error message for
line 7.
And why is the predefined logical operation "and" for boolean values defined
in STANDARD in contradiction to the predefined logical operation "AND" for
boolean arrays?


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




  reply	other threads:[~1998-07-16  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 [this message]
1998-07-17  0:00   ` Robert Dewar
1998-07-16  0:00 ` dennison
1998-07-16  0:00 ` dennison
1998-07-16  0:00 ` Tucker Taft
1998-07-16  0:00 ` Anonymous
1998-07-17  0:00 ` Andreas Kalla
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