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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!harvard.harvard.edu!uucp%ihnp4.UUCP From: uucp%ihnp4.UUCP@HARVARD.HARVARD.EDU (UUCP Admin) Newsgroups: net.lang.ada Subject: Warning From uucp Message-ID: <8510171659.AA16103@py.garage.packard.DK> Date: Thu, 17-Oct-85 12:53:11 EDT Article-I.D.: py.8510171659.AA16103 Posted: Thu Oct 17 12:53:11 1985 Date-Received: Sat, 19-Oct-85 04:38:28 EDT Sender: daemon@ucbvax.ARPA Organization: The ARPA Internet List-Id: We have been unable to contact machine 'delftcc' since you queued your job. delftcc!mail sam (Date 10/14) The job will be deleted in several days if the problem is not corrected. If you care to kill the job, execute the following command: uustat -kdelftccN14f8 Sincerely, ihnp4!uucp ############################################# ##### Data File: ############################ >From seismo!harvard!USC-ECLB.ARPA:INFO-ADA Mon Oct 14 16:37:50 1985 remote from ihnp4 Received: by ihnp4.ATT.UUCP id AA02447; 14 Oct 85 16:37:50 CDT (Mon) Received: from harvard.ARPA (HARVARD.HARVARD.EDU) by seismo.CSS.GOV with SMTP; Mon, 14 Oct 85 04:48:43 EDT Received: from USC-ECLB.ARPA by harvard.ARPA; Mon, 14 Oct 85 04:49:45 EDT Return-Path: Received: from UCB-VAX.ARPA by USC-ECLB.ARPA; Fri 4 Oct 85 15:26:46-PDT Received: by UCB-VAX (5.28/5.12) id AA14247; Fri, 4 Oct 85 14:12:00 PDT From: ihnp4!seismo!ucb-vax.Berkeley.EDU!harvard!allegra!princeton!siemens!gypsy!rosen Date: 3 Oct 85 17:29:00 GMT Subject: Please Test This Message-Id: <38000023@gypsy.UUCP> Precedence: junk Sender: ihnp4!seismo!harvard!ucb-vax.Berkeley.EDU:usenet Errors-To: ihnp4!seismo!harvard!ucb-vax.Berkeley.EDU:usenet To: UCB-VAX.Berkeley.EDU!info-ada Resent-Date: Sun 13 Oct 85 15:47:07-PDT Resent-To: USC-ECLB.ARPA!info-ada Resent-Message-Id: <12150885421.35.INFO-ADA@USC-ECLB.ARPA> Can someone run this small program through their Ada compiler and let me know what it has to say. I've already run it though the Verdix compiler and the Ada/ED compiler both for Unix 4.2 on a Vax. If you have a different compiler, then I'd like to know what it has to say. The error concerns the importation of the equality operator for objects that are of an access type and are declared in a different package. The Verdix compiler says that if I do not issue a "use" clause for the imported package (the one with the access type definitions), then I must qualify the "=" operator since it is not directly visible. The Ada/ED compiler doesn't require this. I believe the Verdix compiler is right since it is taking the LRM literally, but I would like to know what other compilers say. Here's the program: ---------------------------------------------------------------------------- package IMPORT_ACCESS_TYPE is type POINTER is access INTEGER; -- -- Declaration of a public access type. -- end IMPORT_ACCESS_TYPE; ---------------------------------------------------------------------------- with IMPORT_ACCESS_TYPE; -- Notice the the lack of a 'use' clause -- which is very important in this example procedure MAIN is X,Y: IMPORT_ACCESS_TYPE.POINTER; begin -- -- The compiler will/should complain about the test for equality in the -- following statement since the "=" operator is not directly visible. -- if (X = null) then Y := X; end if; -- -- The compiler should not complain about the test for equality in the -- following statement. This form is required if there is no "use" clause -- for the package which declares the access types. -- if (IMPORT_ACCESS_TYPE."=" (X, null)) then Y := X; end if; end MAIN; ---------------------------------------------------------------------------- ------------ Steve Rosen Siemens Research and Technology Laboratories Princeton, NJ USENET: {ihnp4|princeton|adrvax}!siemens!gypsy!rosen ARPA: siemens!gypsy!rosen@TOPAZ