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 Path: utzoo!watmath!clyde!cbatt!ihnp4!qantel!lll-lcc!lll-crg!nike!ucbcad!ucbvax!ADA20.ISI.EDU!RRACINE From: RRACINE@ADA20.ISI.EDU (Roger Racine) Newsgroups: net.lang.ada Subject: overloding the equals operator Message-ID: <8609271155.AA05214@ucbvax.Berkeley.EDU> Date: Fri, 26-Sep-86 10:23:43 EDT Article-I.D.: ucbvax.8609271155.AA05214 Posted: Fri Sep 26 10:23:43 1986 Date-Received: Tue, 30-Sep-86 06:32:44 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: Could someone please explain WHY one needs to use a derived type to overload the "=" operator? In particular, why does this not work? Instead of: function "="(left, right : my_type) return boolean; I tried : function "="(first, second : my_type) return boolean; I thought that when the access type was declared, an implicit declaration of the function "="(left, right : my_type) return boolean would occur. Then by using named notation inside the body of "=" I would be able to use the implicit "=". It does not work. Is this due to some rule about scope? Or are the two compilers I checked it on wrong? -------