From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d861a3fe9d7fc423 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Ada 95 Modular Types Question 4.5.1(2) Date: 1997/11/26 Message-ID: #1/1 X-Deja-AN: 292900500 Sender: news@inmet.camb.inmet.com (USENET news) References: X-Nntp-Posting-Host: houdini.camb.inmet.com Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-11-26T00:00:00+00:00 List-Id: Thomas A Peterson (tap@htc.honeywell.com) wrote: : If I define a modular type in a package and use the type in another : compilation unit are the logical operators visible by default? There is nothing special about the logical operators of modular types. To get direct visibility on the primitive operators of any type, you need to "use" the package where the type is declared, or "use type" a subtype of the type, or do local renames of the operators. : The GNAT compiler and Rational Apex compiler differ with respect to the : visibility of the logical operators and I would like to send someone a bug : report. : Here is an example... : package Example is : type Unsigned_Byte is mod 256; : end Example; : with Example; : procedure Test_Example is : A : Example.Unsigned_Byte := 11; : B : Example.Unsigned_Byte := 37; : C : Example.Unsigned_Byte; : begin : C := A or B; ^^ If the compiler accepts this it has a bug (albeit a "friendly" one ;-). : --C := Example."or"(A, B); : end Test_Example; : Thanks, Tom -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA