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,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c38c724a0aa91874 X-Google-Attributes: gid103376,public From: johnherro@aol.com (John Herro) Subject: Re: Help: redefining equality Date: 1997/06/17 Message-ID: <19970617192001.PAA15297@ladder02.news.aol.com>#1/1 X-Deja-AN: 249129137 References: <33A6C7B8.796A@lmco.com> X-Admin: news@aol.com Organization: AOL http://www.aol.com Newsgroups: comp.lang.ada Date: 1997-06-17T00:00:00+00:00 List-Id: Paul Cohen writes: > What was the "standard trick" in Ada83 > for being able to redefine equality for > non-private types (even though the language > seemingly does not allow it)? I don't know if this is a "standard trick," but the way I've always done it in Ada 83 is to write, for example, if Equal(X1, X2) then ... and write my own function Equal. The problem is that if X1 and X2 belong to a non-private type, the language doesn't prevent you from forgetting to call your own function and accidentally writing if X1 = X2 then ... instead. - John Herro Software Innovations Technology http://members.aol.com/AdaTutor ftp://members.aol.com/AdaTutor