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 Lines: 19 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? -------